From: Nicolas Dufresne Date: Wed, 18 Sep 2024 17:14:32 +0000 (-0400) Subject: v4l2object: Fix a gvalue leak on error X-Git-Tag: 1.24.9~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68728dda4be06b87a5e3cacf563bee63e33bf7ec;p=platform%2Fupstream%2Fgstreamer.git v4l2object: Fix a gvalue leak on error In case we failed enumerating the supported interlacing mode, we leaked the gvalue. Part-of: --- diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index 9b9db41652..472a24ef55 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -2378,9 +2378,11 @@ gst_v4l2_object_add_interlace_mode (GstV4l2Object * v4l2object, if (gst_v4l2src_value_simplify (&interlace_formats) || gst_value_list_get_size (&interlace_formats) > 0) gst_structure_take_value (s, "interlace-mode", &interlace_formats); - else + else { GST_WARNING_OBJECT (v4l2object->dbg_obj, "Failed to determine interlace mode"); + g_value_unset (&interlace_formats); + } return; }