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

Submitted by Christophe Fergeau on Aug. 24, 2011, 9:41 a.m.

Details

Message ID 1314153693-31899-3-git-send-email-cfergeau@redhat.com
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Christophe Fergeau Aug. 24, 2011, 9:41 a.m.
Issue found by the Coverity scanner.
---
 server/jpeg_encoder.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

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,