Skip to content

Commit

Permalink
Fix: possible memory leak detected via ccc-analyzer
Browse files Browse the repository at this point in the history
Fix null check

Bug Summary
File:	misc/ipc.c
Warning:	line 256, column 10
Potential leak of memory pointed to by 'ctxs'
  • Loading branch information
jjnicola committed Oct 21, 2022
1 parent 134ee40 commit fc35c87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ ipc_contexts_init (int cap)
exit:
return ctxs;
free_and_exit:
if (ctxs == NULL)
if (ctxs != NULL)
free (ctxs);
return NULL;
}
Expand Down

0 comments on commit fc35c87

Please sign in to comment.