validate:scenario: Fix a leak when done waiting for an ASYNC action
authorThibault Saunier <tsaunier@igalia.com>
Thu, 8 Sep 2022 22:25:07 +0000 (18:25 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 20 Sep 2022 13:23:02 +0000 (13:23 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>

subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c

index 2bca7d3..17c9716 100644 (file)
@@ -6259,8 +6259,10 @@ gst_validate_action_set_done (GstValidateAction * action)
   g_assert (!action->priv->pending_set_done);
   action->priv->pending_set_done = TRUE;
 
-  if (scenario && scenario->priv->wait_message_action == action)
+  if (scenario && scenario->priv->wait_message_action == action) {
+    gst_validate_action_unref (scenario->priv->wait_message_action);
     scenario->priv->wait_message_action = NULL;
+  }
   gst_clear_object (&scenario);
 
   g_main_context_invoke_full (action->priv->context,