[Spice-devel] [spice-gtk 4/4] mjpeg: don't leak last stream image
Christophe Fergeau
cfergeau at redhat.com
Fri Jul 29 07:50:45 PDT 2011
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
More information about the Spice-devel
mailing list