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
2026-04-11 08:54:57 +00:00
committed by sfan5
parent 3e3048a5aa
commit 062f4bf047
+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;
}