audio-converter: Free config when gst_audio_converter_new fails

The config got leaked when parameter validation fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1140>
This commit is contained in:
Jan Alexander Steffens (heftig) 2021-05-06 18:22:45 +02:00 committed by GStreamer Marge Bot
parent f8dc833975
commit b835356d6c

View file

@ -1434,12 +1434,14 @@ gst_audio_converter_new (GstAudioConverterFlags flags, GstAudioInfo * in_info,
unpositioned:
{
GST_WARNING ("unpositioned channels");
g_clear_pointer (&config, gst_structure_free);
return NULL;
}
invalid_mix_matrix:
{
GST_WARNING ("Invalid mix matrix");
g_clear_pointer (&config, gst_structure_free);
return NULL;
}
}