[Spice-devel] [PATCH] remove small leak in MJPEG code
Frediano Ziglio
fziglio at redhat.com
Wed Oct 14 08:32:56 PDT 2015
cinfo.dest is allocated in spice_jpeg_mem_dest but never freed.
Note that jpeg_destroy_compress does not free this field as is
supposed to be a buffer provided by jpeg caller.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/mjpeg_encoder.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/mjpeg_encoder.c b/server/mjpeg_encoder.c
index 4b803a9..f4f0ce6 100644
--- a/server/mjpeg_encoder.c
+++ b/server/mjpeg_encoder.c
@@ -226,6 +226,7 @@ MJpegEncoder *mjpeg_encoder_new(uint64_t starting_bit_rate,
void mjpeg_encoder_destroy(MJpegEncoder *encoder)
{
+ free(encoder->cinfo.dest);
jpeg_destroy_compress(&encoder->cinfo);
free(encoder->row);
free(encoder);
--
2.4.3
More information about the Spice-devel
mailing list