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 758161 - qtdemux: Fix string memory leak
qtdemux: Fix string 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-11-16 07:55 UTC by Vineeth
Modified: 2015-11-16 08:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix string leak (1.54 KB, patch)
2015-11-16 07:57 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-11-16 07:55:38 UTC
The string got using g_strdup_printf will be allocated memory and should be freed after use.

Fixes the below memory leak

==2692== 24 bytes in 1 blocks are definitely lost in loss record 8,801 of 18,861
==2692==    at 0x402C17C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==2692==    by 0x4B9F2AF: __vasprintf_chk (vasprintf_chk.c:80)
==2692==    by 0x4A07689: g_vasprintf (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==2692==    by 0x49E0FF2: g_strdup_vprintf (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==2692==    by 0x49E1022: g_strdup_printf (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==2692==    by 0xF4CE647: qtdemux_parse_tree (qtdemux.c:12763)
==2692==    by 0xF4D76B8: gst_qtdemux_loop_state_header (qtdemux.c:3866)
==2692==    by 0xF4DBAB0: gst_qtdemux_loop (qtdemux.c:5268)
==2692==    by 0x414DBD8: gst_task_func (gsttask.c:331)
==2692==    by 0x414ED7E: default_func (gsttaskpool.c:68)
==2692==    by 0x49EA404: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==2692==    by 0x49E99A9: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
Comment 1 Vineeth 2015-11-16 07:57:34 UTC
Created attachment 315650 [details] [review]
fix string leak

Fix leak mentioned in above comment and 2 more similar leaks
Comment 2 Sebastian Dröge (slomo) 2015-11-16 08:23:43 UTC
commit 0d4e3847f0c9106ed345f0316e4954f82332e250
Author: Vineeth TM <vineeth.tm@samsung.com>
Date:   Mon Nov 16 16:56:04 2015 +0900

    qtdemux: Fix string memory leak
    
    The string got using g_strdup_printf will be allocated memory
    and should be freed after use.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758161