GNOME Bugzilla – Bug 776376
resindvd, uvch264src, dx9screencapsrc: fix clock ref leaks in error paths
Last modified: 2018-04-16 08:15:00 UTC
Created attachment 342370 [details] [review] Fix memory leaks in usage of gst_element_get_clock API Fix memory leaks in usage of gst_element_get_clock API. gst_element_get_clock() API returns the GstClock of the element which need to be unref after the usage. Fixes applied in following files: ext/resindvd/rsninputselector.c sys/uvch264/gstuvch264_src.c sys/winscreencap/gstdx9screencapsrc.c Please check the attached patch file.
Review of attachment 342370 [details] [review]: ::: sys/winscreencap/gstdx9screencapsrc.c @@ +518,3 @@ GST_OBJECT_UNLOCK (src); + if (clock != NULL) + gst_object_unref (clock); The code using the clock here seems generally broken. The "if (frame_number != -1 && frame_number == src->frame_number)" assumes that clock != NULL although the code above it handles the other case too. Please fix that while you're at it. Apart from that all these changes look ok
Created attachment 342486 [details] [review] Fix memory leaks in usage of gst_element_get_clock API Please find the attached modified patch.
Patch was updated (but not sure I understand what else should be done according to comment #1).
The other thing will just have to be fixed when someone runs into it. commit 8e6375c08b2a41760d51b132486f3988e71e36b3 Author: Garima Gaur <garima.g@samsung.com> Date: Tue Dec 27 11:14:00 2016 +0530 resindvd, uvch264src, dx9screencapsrc: fix clock ref leaks in error paths https://bugzilla.gnome.org/show_bug.cgi?id=776376