After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 407057 - [wavparse] leaks contents of every buffer pushed when in push mode
[wavparse] leaks contents of every buffer pushed when in push mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.6
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
: 432886 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-02-12 13:27 UTC by Jonathan Matthew
Modified: 2007-04-24 09:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.43 KB, patch)
2007-02-12 13:31 UTC, Jonathan Matthew
committed Details | Review

Description Jonathan Matthew 2007-02-12 13:27:56 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.
Comment 1 Jonathan Matthew 2007-02-12 13:31:16 UTC
Created attachment 82381 [details] [review]
patch

(patch may suck slightly due to fd.o anon cvs being down currently)
Comment 2 Gilles Dartiguelongue 2007-02-12 20:40:50 UTC
Had this, trying that :)
Comment 3 Tim-Philipp Müller 2007-02-12 23:27:55 UTC
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.

Comment 4 James "Doc" Livingston 2007-04-24 09:12:15 UTC
*** Bug 432886 has been marked as a duplicate of this bug. ***