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 307606 - gstplaybasebin leaks mutex
gstplaybasebin leaks mutex
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: High normal
: 0.8.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-14 09:45 UTC by Paolo Borelli
Modified: 2005-06-20 06:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
untested patch (1.93 KB, patch)
2005-06-14 09:47 UTC, Paolo Borelli
none Details | Review

Description Paolo Borelli 2005-06-14 09:45:34 UTC
<disclaimer>clueless about GStreamer internals</disclaimer>

valgrind tells me[1] that gstplaybasebin leaks the mutex... from a quick look at
the code I see that gstplaybasebin implements dispose but not finalize: I think
it should implement finalize instead of dispose (dispose may run more than once)
and use finalize to free both the strings currently freed in dispose and the mutex.

Patch follows: UNTESTED


[1]:
==27776== 24 bytes in 1 blocks are definitely lost in loss record 8213 of 14968
==27776==    at 0x3414A5C1: malloc (vg_replace_malloc.c:131)
==27776==    by 0x35192136: IA__g_malloc (gmem.c:137)
==27776==    by 0x35132512: g_mutex_new_posix_impl (gthread-posix.c:151)
==27776==    by 0x35BC037F: gst_play_base_bin_init (gstplaybasebin.c:251)
==27776==    by 0x350EDECA: IA__g_type_create_instance (gtype.c:1588)
==27776==    by 0x350D97CE: g_object_constructor (gobject.c:1052)
==27776==    by 0x3446A2E7: gst_object_constructor (gstobject.c:197)
Comment 1 Paolo Borelli 2005-06-14 09:47:25 UTC
Created attachment 47747 [details] [review]
untested patch
Comment 2 Christian Kirbach 2005-06-14 16:15:53 UTC
I think you should test your patch somewhat :)

anyways, raising priority to make maintainers aware of the patch.
Comment 3 Luca Ognibene 2005-06-19 12:12:35 UTC
committed. 
Thanks for the patch.
Comment 4 Ronald Bultje 2005-06-20 06:49:01 UTC
Closing, thanks Luca.