From a64cb81a36f0a0db762b6f89a52e6d3e73d786e6 Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Wed, 17 Jan 2018 11:37:10 -0800 Subject: [PATCH] xrdp: fix some leaks in xrdp_encoder.c --- xrdp/xrdp_encoder.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c index 4d80214e..fddc6e45 100644 --- a/xrdp/xrdp_encoder.c +++ b/xrdp/xrdp_encoder.c @@ -169,6 +169,16 @@ xrdp_encoder_delete(struct xrdp_encoder *self) /* todo delete specific encoder */ + if (self->process_enc == process_enc_jpg) + { + } + else if (self->process_enc == process_enc_rfx) + { +#ifdef XRDP_RFXCODEC + rfxcodec_encode_destroy(self->codec_handle); +#endif + } + /* destroy wait objects used for signalling */ g_delete_wait_obj(self->xrdp_encoder_event_to_proc); g_delete_wait_obj(self->xrdp_encoder_event_processed); @@ -208,6 +218,7 @@ xrdp_encoder_delete(struct xrdp_encoder *self) } fifo_delete(fifo); } + tc_mutex_delete(self->mutex); g_free(self); }