player: fix leak on client-message send failure

when there's a flood of events causing the event queue to
overflow, the duplicated client-message payload gets dropped
without being released. free it on failure too.

discovered while trying to trigger #10110.
This commit is contained in:
NRK authored and sfan5 committed 2026-04-11 19:27:44 +02:00
1 parent 3e3048a5aa
commit 062f4bf047
1 file changed
+3 -1
+3 -1
View File
@@ -818,11 +818,13 @@ int mp_client_send_event(struct MPContext *mpctx, const char *client_name,
r = send_event(ctx, &event_data, false);
} else {
r = -1;
talloc_free(data);
}
mp_mutex_unlock(&clients->lock);
if (r < 0)
talloc_free(data);
return r;
}