validate:scenario: Fix a leak when done waiting for an ASYNC action

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3000>
This commit is contained in:
Thibault Saunier 2022-09-08 18:25:07 -04:00 committed by GStreamer Marge Bot
parent 5724a64660
commit 515e1b55ee

View file

@ -6259,8 +6259,10 @@ gst_validate_action_set_done (GstValidateAction * action)
g_assert (!action->priv->pending_set_done); g_assert (!action->priv->pending_set_done);
action->priv->pending_set_done = TRUE; 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; scenario->priv->wait_message_action = NULL;
}
gst_clear_object (&scenario); gst_clear_object (&scenario);
g_main_context_invoke_full (action->priv->context, g_main_context_invoke_full (action->priv->context,