diff --git a/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c b/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c index 232b7858b9..7a1c01e714 100644 --- a/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c +++ b/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.c @@ -607,6 +607,12 @@ struct _GstValidateActionTypePrivate static void _action_type_free (GstValidateActionType * type) { + for (gint i = 0; type->parameters[i].name; i++) { + if (type->parameters[i].free) { + type->parameters[i].free (&type->parameters[i]); + } + } + g_free (type->parameters); g_free (type->description); g_free (type->name); diff --git a/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.h b/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.h index b4a28f4254..7f18cf2dd4 100644 --- a/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.h +++ b/subprojects/gst-devtools/validate/gst/validate/gst-validate-scenario.h @@ -318,8 +318,17 @@ struct _GstValidateActionParameter const gchar *possible_variables; const gchar *def; + /** + * GstValidateActionParameter.free: + * + * Function that frees the various members of the structure when done using + * + * Since: 1.24 + */ + GDestroyNotify free; + /*< private >*/ - gpointer _gst_reserved[GST_PADDING]; + gpointer _gst_reserved[GST_PADDING - 1]; }; struct _GstValidateScenarioClass