GNOME Bugzilla – Bug 407057
[wavparse] leaks contents of every buffer pushed when in push mode
Last modified: 2007-04-24 09:12:15 UTC
wavparse does this in push mode: GST_BUFFER_DATA (buffer) = gst_adapter_take (wav->adapter, n); without also setting GST_BUFFER_MALLOCDATA(), so it leaks the data. The buffer object created in gst_wavparse_stream_init() is also leaked.
Created attachment 82381 [details] [review] patch (patch may suck slightly due to fd.o anon cvs being down currently)
Had this, trying that :)
Thanks for the patch! Committed this with the following changes: - use gst_adapter_take_buffer() - gst_wavparse_parse_file_header() takes ownership of the buffer passed as far as I can see, so no need to unref buffer afterwards (in fact, I think it would lead to double frees) 2007-02-12 Tim-Philipp Müller <tim at centricular dot net> Based on patch by: Jonathan Matthew <jonathan at kaolin wh9 net> * gst/wavparse/gstwavparse.c: (gst_wavparse_parse_stream_init), (gst_wavparse_stream_data): Fix massive memory leak when operating in streaming mode due to GST_BUFFER_MALLOCDATA() not being set on newly-created buffers. Fixes #407057.
*** Bug 432886 has been marked as a duplicate of this bug. ***