ext/libpng/gstpngenc.c: Don't leak buffer data memory. Fixes #498395.

Original commit message from CVS:
Patch by: René Stadler <mail at renestadler dot de>
* ext/libpng/gstpngenc.c:
Don't leak buffer data memory. Fixes #498395.
This commit is contained in:
René Stadler 2007-11-20 12:11:13 +00:00 committed by Stefan Kost
parent 8599583911
commit 696e4b0236
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2007-11-20 Stefan Kost <ensonic@users.sf.net>
Patch by: René Stadler <mail at renestadler dot de>
* ext/libpng/gstpngenc.c:
Don't leak buffer data memory. Fixes #498395.
2007-11-20 Stefan Kost <ensonic@users.sf.net>
Patch by: René Stadler <mail at renestadler dot de>

View file

@ -228,7 +228,8 @@ user_write_data (png_structp png_ptr, png_bytep data, png_uint_32 length)
pngenc = (GstPngEnc *) png_get_io_ptr (png_ptr);
buffer = gst_buffer_new ();
GST_BUFFER_DATA (buffer) = g_memdup (data, length);
GST_BUFFER_MALLOCDATA (buffer) = g_memdup (data, length);
GST_BUFFER_DATA (buffer) = GST_BUFFER_MALLOCDATA (buffer);
GST_BUFFER_SIZE (buffer) = length;
if (pngenc->buffer_out) {