GNOME Bugzilla – Bug 755774
don't leak caps and its strings
Last modified: 2015-10-01 04:08:55 UTC
Here's a patch to fix leakages when using caps_from_string and caps_to_string.
Created attachment 312346 [details] [review] fix caps leakages
Created attachment 312400 [details] [review] fix caps leakages
make check fails with it: ==================================================================== GStreamer Editing Services 1.7.0.1: tests/check/test-suite.log ==================================================================== # TOTAL: 19 # PASS: 17 # SKIP: 0 # XFAIL: 0 # FAIL: 2 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 FAIL: ges/group =============== Running suite(s): ges-group Unexpected critical/warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed 80%: Checks: 5, Failures: 1, Errors: 0 gstcheck.c:79:F:group:test_group_serialization:0: Unexpected critical/warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed FAIL ges/group (exit status: 1) FAIL: ges/project ================= Running suite(s): ges-project Unexpected critical/warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed Unexpected critical/warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed Unexpected critical/warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed 0:00:00.118140515 23192 0x5605d096cca0 ERROR GST_PIPELINE grammar.y:691:priv_gst_parse_yyparse: no element "nowaythiselementexists" 50%: Checks: 6, Failures: 3, Errors: 0 gstcheck.c:79:F:project:test_project_load_xges:0: Unexpected critical/warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed gstcheck.c:79:F:project:test_project_add_properties:0: Unexpected critical/warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed gstcheck.c:79:F:project:test_project_auto_transition:0: Unexpected critical/warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed FAIL ges/project (exit status: 3)
Review of attachment 312400 [details] [review]: Breaks testsuite
Comment on attachment 312400 [details] [review] fix caps leakages I suspect: + gst_object_unref (restriction_caps); ;)
(In reply to Tim-Philipp Müller from comment #5) > Comment on attachment 312400 [details] [review] [review] > fix caps leakages > > I suspect: > > + gst_object_unref (restriction_caps); > > ;) Yes, I did mistake.:) It should be gst_caps_unref. Thank you! I moved my patch to https://phabricator.freedesktop.org/D303