summaryrefslogtreecommitdiffstats
path: root/input/ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'input/ipc.c')
-rw-r--r--input/ipc.c4
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: