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 385292 - [rmdemux] stream index leaked on shutdown
[rmdemux] stream index leaked on shutdown
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
0.10.4
Other All
: Normal minor
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-13 01:37 UTC by Roland Kay
Modified: 2006-12-14 11:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Corrective patch (455 bytes, patch)
2006-12-13 01:40 UTC, Roland Kay
committed Details | Review

Description Roland Kay 2006-12-13 01:37:49 UTC
Please describe the problem:
When parsing an index header chunk gst_rmdemux_parse_indx_data() uses g_malloc()
to allocate a GstRMDemuxIndex structure and stores the pointer in the relevant GstRMDemuxStream structure in GstRMDemux. However, in gst_rmdemux_reset() only the pointers to GstRMDemuxStream are freed (using g_free()) and any pointer these structures contain are leaked.

Steps to reproduce:
1. Play http://samples.mplayerhq.hu/real/AC-sipr/autahi-vox.rm in any app that uses GStreamer under valgrind.


Actual results:
==22890== 1729 (1644 direct, 85 indirect) bytes in 3 blocks are definitely lost in loss record 25 of 26
==22890==    at 0x1B8FF8A6: malloc (in /usr/lib/valgrind/vgpreload_memcheck.so)
==22890==    by 0x1BB8E45A: g_malloc (in /opt/gnome/lib/libglib-2.0.so.0.800.1)
==22890==    by 0x1C36E28D: gst_rmdemux_chain (rmdemux.c:1733)
==22890==    by 0x1C36F9D1: gst_rmdemux_loop (rmdemux.c:827)
==22890==    by 0x1B953C7E: gst_task_func (gsttask.c:192)
==22890==    by 0x1BBA7A54: (within /opt/gnome/lib/libglib-2.0.so.0.800.1)
==22890==    by 0x1BBA5B60: (within /opt/gnome/lib/libglib-2.0.so.0.800.1)
==22890==    by 0x1B9EA296: start_thread (in /lib/tls/libpthread-2.3.5.so)
==22890==    by 0x1BCA637D: clone (in /lib/tls/libc-2.3.5.so)
==22890==    by 0x1C573BAF: ???


Expected results:


Does this happen every time?


Other information:
Patch attached below.
Comment 1 Roland Kay 2006-12-13 01:40:35 UTC
Created attachment 78253 [details] [review]
Corrective patch
Comment 2 Tim-Philipp Müller 2006-12-13 10:49:55 UTC
Thanks, looks good, will commit after freeze.
Comment 3 Tim-Philipp Müller 2006-12-14 11:27:04 UTC
Committed, thanks for the patch.

 2006-12-14  Tim-Philipp Müller  <tim at centricular dot net>
 
       Patch by: Roland Kay  <roland.kay at ox compsoc net>

       * gst/realmedia/rmdemux.c: (gst_rmdemux_reset):
         Don't leak stream index (#385292).