mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 19:19:05 +00:00
reds: fix memory leak when core->base.minor_version < 3
This commit is contained in:
parent
5fb3d2557e
commit
313e2622d9
@ -196,10 +196,9 @@ static void reds_stream_push_channel_event(RedsStream *s, int event)
|
||||
|
||||
void reds_handle_channel_event(int event, SpiceChannelEventInfo *info)
|
||||
{
|
||||
if (core->base.minor_version < 3 || core->channel_event == NULL)
|
||||
return;
|
||||
if (core->base.minor_version >= 3 && core->channel_event != NULL)
|
||||
core->channel_event(event, info);
|
||||
|
||||
core->channel_event(event, info);
|
||||
if (event == SPICE_CHANNEL_EVENT_DISCONNECTED) {
|
||||
free(info);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user