From: Edward Hervey Date: Thu, 12 Apr 2012 13:06:15 +0000 (+0200) Subject: check: Fix one leak in volume test X-Git-Tag: 1.19.3~511^2~6589 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fd3f8f2c108c81f5fef78aeecd3bb0c84c3192f;p=platform%2Fupstream%2Fgstreamer.git check: Fix one leak in volume test --- diff --git a/tests/check/elements/volume.c b/tests/check/elements/volume.c index 870f16b..99806e3 100644 --- a/tests/check/elements/volume.c +++ b/tests/check/elements/volume.c @@ -1733,6 +1733,7 @@ GST_START_TEST (test_controller_usability) { GstControlSource *cs; GstTimedValueControlSource *tvcs; + GstControlBinding *cb; GstElement *volume; volume = setup_volume (); @@ -1740,8 +1741,8 @@ GST_START_TEST (test_controller_usability) /* this shouldn't crash, whether this mode is implemented or not */ cs = gst_interpolation_control_source_new (); g_object_set (cs, "mode", GST_INTERPOLATION_MODE_CUBIC, NULL); - gst_object_add_control_binding (GST_OBJECT_CAST (volume), - gst_direct_control_binding_new (GST_OBJECT_CAST (volume), "volume", cs)); + cb = gst_direct_control_binding_new (GST_OBJECT_CAST (volume), "volume", cs); + gst_object_add_control_binding (GST_OBJECT_CAST (volume), cb); tvcs = (GstTimedValueControlSource *) cs; gst_timed_value_control_source_set (tvcs, 0 * GST_SECOND, 0.0); @@ -1749,6 +1750,7 @@ GST_START_TEST (test_controller_usability) gst_timed_value_control_source_set (tvcs, 10 * GST_SECOND, 0.0); gst_object_unref (cs); + gst_object_remove_control_binding (GST_OBJECT_CAST (volume), cb); cleanup_volume (volume); }