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 788508 - mxfdemux: Fix Memory leak in error case
mxfdemux: Fix Memory leak in error case
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.13.x
Other All
: Normal minor
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-10-04 11:26 UTC by Ponnam Srinivas
Modified: 2017-10-06 17:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch file attached (649 bytes, text/plain)
2017-10-04 11:26 UTC, Ponnam Srinivas
  Details
patch file attached (649 bytes, patch)
2017-10-04 11:27 UTC, Ponnam Srinivas
committed Details | Review

Description Ponnam Srinivas 2017-10-04 11:26:38 UTC
Created attachment 360905 [details]
patch file attached

Hi,
  
  In gst_mxf_demux_handle_index_table_segment () , memory leak in error case.
  
  code:
  segment = g_new0 (MXFIndexTableSegment, 1);

  gst_buffer_map (buffer, &map, GST_MAP_READ);
  ret = mxf_index_table_segment_parse (key, segment, map.data, map.size);
  gst_buffer_unmap (buffer, &map);

  if (!ret) {
    GST_ERROR_OBJECT (demux, "Parsing index table segment failed");
    return GST_FLOW_ERROR;
  }
  
  sol:  g_free (segment); added in error case.
  
  Patch added . Please review and share feedback.
Comment 1 Ponnam Srinivas 2017-10-04 11:27:34 UTC
Created attachment 360906 [details] [review]
patch file attached
Comment 2 Ponnam Srinivas 2017-10-06 17:06:16 UTC
patch attached.please review and share feedback
Comment 3 Tim-Philipp Müller 2017-10-06 17:16:31 UTC
Pushed, thanks for the patch!

commit ff0ccc2a111ba48e6fae756b46b7b6018c250e32 (HEAD -> master)
Author: Ponnam Srinivas <p.srinivas@samsung.com>
Date:   Wed Oct 4 16:29:52 2017 +0530

    mxfdemux: Fix memory leak in error case
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788508