GNOME Bugzilla – Bug 307606
gstplaybasebin leaks mutex
Last modified: 2005-06-20 06:49:01 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)
Created attachment 47747 [details] [review] untested patch
I think you should test your patch somewhat :) anyways, raising priority to make maintainers aware of the patch.
committed. Thanks for the patch.
Closing, thanks Luca.