[Spice-devel] [PATCH 3/3] fix leak in do_jpeg_encode

Christophe Fergeau cfergeau at redhat.com
Tue Aug 23 19:41:33 PDT 2011


Issue found by the Coverity scanner.
---
 server/jpeg_encoder.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/server/jpeg_encoder.c b/server/jpeg_encoder.c
index 85ef54e..a2320b5 100644
--- a/server/jpeg_encoder.c
+++ b/server/jpeg_encoder.c
@@ -194,6 +194,7 @@ static void do_jpeg_encode(JpegEncoder *jpeg, uint8_t *lines, unsigned int num_l
         row_pointer[0] = RGB24_line;
         jpeg_write_scanlines(&jpeg->cinfo, row_pointer, 1);
     }
+    free(RGB24_line);
 }
 
 int jpeg_encode(JpegEncoderContext *jpeg, int quality, JpegEncoderImageType type,
-- 
1.7.6



More information about the Spice-devel mailing list