Skip to content

Commit 01f18eb

Browse files
committed
job-list: cleanup correct memory on error path
Problem: In the idsync_add_waiter() function, the cleanup path cleaned up the wrong memory. Solution: Clean up the zlistx_t that was possibly created within the function, not the data structure passed in as a parameter.
1 parent 6336369 commit 01f18eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/job-list/idsync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static int idsync_add_waiter (struct idsync_ctx *isctx,
193193
return 0;
194194

195195
enomem:
196-
idsync_data_destroy (isd);
196+
zlistx_destroy (&list_isd);
197197
errno = ENOMEM;
198198
return -1;
199199
}

0 commit comments

Comments
 (0)