Skip to content

Commit

Permalink
Fix memory leak in i3-msg. (#2542)
Browse files Browse the repository at this point in the history
relates to #2541
  • Loading branch information
Airblader authored and stapelberg committed Nov 6, 2016
1 parent e48119a commit 9c6a21f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions i3-msg/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,10 @@ int main(int argc, char *argv[]) {
/* For the reply of commands, have a look if that command was successful.
* If not, nicely format the error message. */
if (reply_type == I3_IPC_MESSAGE_TYPE_COMMAND) {
yajl_handle handle;
handle = yajl_alloc(&reply_callbacks, NULL, NULL);
yajl_handle handle = yajl_alloc(&reply_callbacks, NULL, NULL);
yajl_status state = yajl_parse(handle, (const unsigned char *)reply, reply_length);
yajl_free(handle);

switch (state) {
case yajl_status_ok:
break;
Expand Down

0 comments on commit 9c6a21f

Please sign in to comment.