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 756231 - mpegaudioparse: Fix buffer memory leak
mpegaudioparse: Fix buffer memory leak
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-08 07:37 UTC by Vineeth
Modified: 2015-10-12 13:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix buffer leak (1.48 KB, patch)
2015-10-08 07:38 UTC, Vineeth
none Details | Review
fix buffer leak (1.51 KB, patch)
2015-10-12 01:52 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-10-08 07:37:30 UTC
mapped buffer is not being unmapped during failures
Comment 1 Vineeth 2015-10-08 07:38:24 UTC
Created attachment 312890 [details] [review]
fix buffer leak
Comment 2 Sebastian Dröge (slomo) 2015-10-08 14:07:33 UTC
Review of attachment 312890 [details] [review]:

::: gst/audioparsers/gstmpegaudioparse.c
@@ +439,1 @@
       return TRUE;

goto cleanup?

@@ +678,1 @@
         return FALSE;

This looks interesting! The function returns a GstFlowReturn, not a gboolean. Also there's a "goto cleanup" here too.

This needs some more fixup

@@ +691,1 @@
       return FALSE;

Same here
Comment 3 Vineeth 2015-10-12 01:52:40 UTC
Created attachment 313091 [details] [review]
fix buffer leak

In all the cases, goto cleanup works.
It was working previously because,  return FALSE is nothing but return GST_FLOW_OK. So goto cleanup also does the same, but in addition takes care of cleaning up the buffer
Comment 4 Sebastian Dröge (slomo) 2015-10-12 13:57:02 UTC
commit fb7783f8b0b6d0d699516e5c3fec9cb75ee271ab
Author: Vineeth TM <vineeth.tm@samsung.com>
Date:   Mon Oct 12 10:48:23 2015 +0900

    mpegaudioparse: Fix buffer memory leak during failures
    
    mapped buffer is not being unmapped during failures
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756231