From 88194d05d32f8a9d6959ec871aeb6b1aaab6f661 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 27 Mar 2020 00:07:03 +0100 Subject: ipc: fix recently added memory leak Sucks. --- input/ipc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'input/ipc.c') 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: -- cgit v1.2.3