From b6c9491c923cef6a266bf441113fa14f37906a9d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 8 May 2020 07:03:49 +0200 Subject: [PATCH] check: gst_promise_reply() takes ownership Copy the structure temporarily to check it further down. CID #1455392 Part-of: --- tests/check/gst/gstpromise.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/check/gst/gstpromise.c b/tests/check/gst/gstpromise.c index 76533990a2..25e6f11d06 100644 --- a/tests/check/gst/gstpromise.c +++ b/tests/check/gst/gstpromise.c @@ -162,12 +162,13 @@ GST_START_TEST (test_reply_data) r = gst_promise_new (); s = gst_structure_new ("promise", "test", G_TYPE_INT, 1, NULL); - gst_promise_reply (r, s); + gst_promise_reply (r, gst_structure_copy (s)); fail_unless (gst_promise_wait (r) == GST_PROMISE_RESULT_REPLIED); ret = gst_promise_get_reply (r); fail_unless (gst_structure_is_equal (ret, s)); gst_promise_unref (r); + gst_structure_free (s); } GST_END_TEST;