diff options
author | wm4 <wm4@nowhere> | 2020-03-27 00:07:03 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-03-27 00:07:03 +0100 |
commit | 88194d05d32f8a9d6959ec871aeb6b1aaab6f661 (patch) | |
tree | 853169edede37513c5f3262cb2408399b5dce79c /input/ipc.c | |
parent | 1a720377203f7cee2ab949c5aa2bc9e0a2a7e0f2 (diff) | |
download | mpv-88194d05d32f8a9d6959ec871aeb6b1aaab6f661.tar.bz2 mpv-88194d05d32f8a9d6959ec871aeb6b1aaab6f661.tar.xz |
ipc: fix recently added memory leak
Sucks.
Diffstat (limited to 'input/ipc.c')
-rw-r--r-- | input/ipc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/input/ipc.c b/input/ipc.c index 1b35afc0ed..34a10bbb00 100644 --- a/input/ipc.c +++ b/input/ipc.c @@ -344,7 +344,7 @@ static char *json_execute_command(struct mpv_handle *client, void *ta_parent, rc = mpv_request_event(client, event, enable); } } else { - mpv_node result_node; + mpv_node result_node = {0}; if (async) { rc = mpv_command_node_async(client, reqid, cmd_node); @@ -355,6 +355,8 @@ static char *json_execute_command(struct mpv_handle *client, void *ta_parent, if (rc >= 0) mpv_node_map_add(ta_parent, &reply_node, "data", &result_node); } + + mpv_free_node_contents(&result_node); } error: |