xfreerdp-server: fix memory leak for snapshots
This commit is contained in:
parent
589e9e1142
commit
636f9fa402
@ -76,7 +76,6 @@ void xf_clear_event(xfEventQueue* event_queue)
|
||||
|
||||
void xf_event_push(xfEventQueue* event_queue, xfEvent* event)
|
||||
{
|
||||
printf("xf_event_push lock\n");
|
||||
pthread_mutex_lock(&(event_queue->mutex));
|
||||
|
||||
if (event_queue->count >= event_queue->size)
|
||||
@ -90,14 +89,12 @@ void xf_event_push(xfEventQueue* event_queue, xfEvent* event)
|
||||
xf_set_event(event_queue);
|
||||
|
||||
pthread_mutex_unlock(&(event_queue->mutex));
|
||||
printf("xf_event_push unlock\n");
|
||||
}
|
||||
|
||||
xfEvent* xf_event_peek(xfEventQueue* event_queue)
|
||||
{
|
||||
xfEvent* event;
|
||||
|
||||
printf("xf_event_peek lock\n");
|
||||
pthread_mutex_lock(&(event_queue->mutex));
|
||||
|
||||
if (event_queue->count < 1)
|
||||
@ -106,7 +103,6 @@ xfEvent* xf_event_peek(xfEventQueue* event_queue)
|
||||
event = event_queue->events[0];
|
||||
|
||||
pthread_mutex_unlock(&(event_queue->mutex));
|
||||
printf("xf_event_peek unlock\n");
|
||||
|
||||
return event;
|
||||
}
|
||||
@ -116,7 +112,6 @@ xfEvent* xf_event_pop(xfEventQueue* event_queue)
|
||||
int i;
|
||||
xfEvent* event;
|
||||
|
||||
printf("xf_event_pop lock\n");
|
||||
pthread_mutex_lock(&(event_queue->mutex));
|
||||
|
||||
if (event_queue->count < 1)
|
||||
@ -129,7 +124,6 @@ xfEvent* xf_event_pop(xfEventQueue* event_queue)
|
||||
event_queue->events[i] = event_queue->events[i + 1];
|
||||
|
||||
pthread_mutex_unlock(&(event_queue->mutex));
|
||||
printf("xf_event_pop unlock\n");
|
||||
|
||||
return event;
|
||||
}
|
||||
|
@ -507,6 +507,8 @@ void xf_peer_rfx_update(freerdp_peer* client, int x, int y, int width, int heigh
|
||||
cmd->destBottom = y + height;
|
||||
}
|
||||
|
||||
XDestroyImage(image);
|
||||
|
||||
cmd->bpp = 32;
|
||||
cmd->codecID = client->settings->rfx_codec_id;
|
||||
cmd->width = width;
|
||||
|
Loading…
Reference in New Issue
Block a user