GNOME Bugzilla – Bug 730010
gst-play: audio_sink and video_sink strings are not freed
Last modified: 2014-05-19 09:18:28 UTC
audio_sink pointer and video_sink pointer are not set free.
Thanks for taking the time to report this bug. This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read http://bugzilla.gnome.org/bug-HOWTO.html and add a more useful description to this bug.
tools/gst-play.c it takes input media/files from command line. proper cleaning of the memory was not done for 2 pointers audio_sink and video_sink. Did freeing of these 2 pointers and tested it. Its working fine. Changes made are : g_free (audio_sink); g_free (video_sink); please review.
Created attachment 276437 [details] [review] freeing of two pointers in tools/gst-play.c
Review of attachment 276437 [details] [review]: ::: tools/gst-play.c @@ +790,3 @@ + g_free (audio_sink); + g_free (video_sink); While this is correct, it would probably be more consistent to free them inside play_free(). Also in the "early return" cases in main() these strings would still be leaked, together with e.g. the playlist_file string
> it would probably be more consistent to free them inside play_free() Not really, since those strings are not stored in the GstPlay structure.
Fixed the leakages in early returns of main(). please review.
Created attachment 276445 [details] [review] fixed the leakages in main()
commit 86c698a46f7efa5f106633f0d8c69683bd03aef2 Author: Sebastian Dröge <sebastian@centricular.com> Date: Mon May 19 11:17:33 2014 +0200 gst-play: Free playlist_file string if only printing the version commit 59131a4ceb8484b5603123b102732770e4e49d22 Author: Anuj Jaiswal <anuj.jaiswal@samsung.com> Date: Tue May 13 14:08:20 2014 +0600 audio_sink and video_sink leakage fixed https://bugzilla.gnome.org/show_bug.cgi?id=730010