mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
validate: Plug some leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/207>
This commit is contained in:
parent
8650c47cd3
commit
7003d692ca
3 changed files with 18 additions and 6 deletions
|
@ -662,9 +662,11 @@ check_report_expected (GstValidateRunner * runner, GstValidateReport * report)
|
|||
gboolean is_sometimes;
|
||||
|
||||
if (!gst_structure_get_boolean (known_issue, "sometimes",
|
||||
&is_sometimes) || !is_sometimes)
|
||||
&is_sometimes) || !is_sometimes) {
|
||||
runner->priv->expected_issues =
|
||||
g_list_remove (runner->priv->expected_issues, known_issue);
|
||||
gst_structure_free (known_issue);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -309,6 +309,13 @@ gst_validate_g_enum_to_string (GType g_enum_type, gint value)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
gst_validate_sink_information_free (GstValidateSinkInformation * info)
|
||||
{
|
||||
gst_object_unref (info->sink);
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_validate_seek_information_free (GstValidateSeekInformation * info)
|
||||
{
|
||||
|
@ -4580,6 +4587,8 @@ gst_validate_scenario_finalize (GObject * object)
|
|||
|
||||
g_list_free_full (priv->seeks,
|
||||
(GDestroyNotify) gst_validate_seek_information_free);
|
||||
g_list_free_full (priv->sinks,
|
||||
(GDestroyNotify) gst_validate_sink_information_free);
|
||||
g_list_free_full (priv->actions, (GDestroyNotify) gst_mini_object_unref);
|
||||
g_list_free_full (priv->interlaced_actions,
|
||||
(GDestroyNotify) gst_mini_object_unref);
|
||||
|
@ -4670,8 +4679,7 @@ _element_removed_cb (GstBin * bin, GstElement * element,
|
|||
GST_DEBUG_OBJECT (scenario, "Removing sink information for %s",
|
||||
GST_ELEMENT_NAME (element));
|
||||
priv->sinks = g_list_remove (priv->sinks, sink_info);
|
||||
gst_object_unref (sink_info->sink);
|
||||
g_free (sink_info);
|
||||
gst_validate_sink_information_free (sink_info);
|
||||
}
|
||||
SCENARIO_UNLOCK (scenario);
|
||||
}
|
||||
|
|
|
@ -1314,7 +1314,7 @@ _resolve_expression (gpointer source, GValue * value)
|
|||
tmp = skip_spaces (tmp);
|
||||
expr = strstr (v, "expr(");
|
||||
if (expr != tmp)
|
||||
return;
|
||||
goto done;
|
||||
|
||||
expr = &expr[5];
|
||||
tmp = &expr[strlen (expr) - 1];
|
||||
|
@ -1322,7 +1322,7 @@ _resolve_expression (gpointer source, GValue * value)
|
|||
tmp--;
|
||||
|
||||
if (tmp == expr || *tmp != ')')
|
||||
return;
|
||||
goto done;
|
||||
|
||||
*tmp = '\0';
|
||||
new_value = gst_validate_utils_parse_expression (expr, NULL, NULL, &error);
|
||||
|
@ -1332,8 +1332,10 @@ _resolve_expression (gpointer source, GValue * value)
|
|||
g_value_unset (value);
|
||||
g_value_init (value, G_TYPE_DOUBLE);
|
||||
g_value_set_double (value, new_value);
|
||||
|
||||
done:
|
||||
g_free (v);
|
||||
g_match_info_free (match_info);
|
||||
g_clear_pointer (&match_info, g_match_info_free);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue