Skip to content

Commit

Permalink
Fix: memory leak detected via ccc-analyzer
Browse files Browse the repository at this point in the history
Finally free the ipc context.

Bug Summary
File:	misc/ipc.c
Warning:	line 193, column 7
Potential leak of memory pointed to by 'pctx'
  • Loading branch information
jjnicola committed Oct 21, 2022
1 parent 815c1a2 commit 845380f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions misc/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ ipc_destroy (struct ipc_context *context)
rc = ipc_pipe_destroy (context->context);
break;
}
if (rc > -1)
free (context);
g_free (context);
return rc;
}

Expand Down

0 comments on commit 845380f

Please sign in to comment.