validate: Plug some leaks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3059>
This commit is contained in:
Thibault Saunier 2022-09-21 11:44:59 -03:00
parent c37182b6b9
commit 55dd7ff4b4

View file

@ -3216,7 +3216,7 @@ set_env_var (GQuark field_id, GValue * value,
static GstValidateExecuteActionReturn
_run_command (GstValidateScenario * scenario, GstValidateAction * action)
{
gchar **argv = NULL, *_stderr;
gchar **argv = NULL, *_stderr = NULL;
GError *error = NULL;
const GValue *env = NULL;
GSubprocess *subproc = NULL;
@ -3254,6 +3254,8 @@ _run_command (GstValidateScenario * scenario, GstValidateAction * action)
REPORT_UNLESS (g_subprocess_get_exit_status (subproc) == 0,
done, "Sub command failed. Stderr: %s", _stderr);
g_free (_stderr);
res = GST_VALIDATE_EXECUTE_ACTION_OK;
done:
@ -3758,6 +3760,8 @@ _execute_appsrc_push (GstValidateScenario * scenario,
segment.stop = tmp;
gst_structure_get_double (segment_struct, "rate", &segment.rate);
gst_structure_free (segment_struct);
gst_sample_set_segment (sample, &segment);
}