GNOME Bugzilla – Bug 351502
g_value_set_string leaks
Last modified: 2006-08-15 19:31:06 UTC
paolo@murdock:~/cvs/gnome2/gst-plugins-base$ rgrep g_value_set_string.*g_strdup . | grep -v binar ./sys/ximage/ximagesink.c: g_value_set_string (value, g_strdup (ximagesink->display_name)); ./sys/xvimage/xvimagesink.c: g_value_set_string (value, g_strdup (xvimagesink->display_name)); paolo@murdock:~/cvs/gnome2/gst-plugins-bad$ rgrep g_value_set_string.*g_strdup . | grep -v binar ./ext/libfame/gstlibfame.c: g_value_set_string (value, g_strdup (fameenc->pattern)); ./sys/glsink/glimagesink.c: g_value_set_string (value, g_strdup (glimage_sink->display_name)); g_value_set_string dups the string itself, so the strdup should be dropped to avoid leaking memory.
Fixed, thanks: -core: 2006-08-15 Tim-Philipp Müller <tim at centricular dot net> * gst/gstutils.c: (gst_util_set_value_from_string): Fix memleak (#351502). * tests/check/gst/gstutils.c: (GST_START_TEST), (gst_utils_suite): Add unit test for most of gst_util_set_value_from_string() (not that one would want to encourage use of this function). -base: 2006-08-15 Tim-Philipp Müller <tim at centricular dot net> * sys/ximage/ximagesink.c: (gst_ximagesink_get_property): * sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_property): Fix leak (#351502). -bad: 2006-08-15 Tim-Philipp Müller <tim at centricular dot net> * ext/libfame/gstlibfame.c: (gst_fameenc_get_property): * sys/glsink/glimagesink.c: (gst_glimage_sink_get_property): Fix leaks (#351502).