mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-16 22:40:53 +08:00
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:
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user