When a stream is destroy, the memory allocated to handle the mjpeg
decoding is freed by calling stream_mjpeg_cleanup. However, the
memory allocated to contain the last uncompressed stream image
wasn't freed.
---
 gtk/channel-display-mjpeg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/gtk/channel-display-mjpeg.c b/gtk/channel-display-mjpeg.c
index 9e8bc0b..cb1bc87 100644
--- a/gtk/channel-display-mjpeg.c
+++ b/gtk/channel-display-mjpeg.c
@@ -138,4 +138,6 @@ G_GNUC_INTERNAL
 void stream_mjpeg_cleanup(display_stream *st)
 {
     jpeg_destroy_decompress(&st->mjpeg_cinfo);
+    free(st->out_frame);
+    st->out_frame = NULL;
 }
-- 
1.7.6

_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to