encoding-target: Properly free when missing type field in parse_encoding_profile

pname and description in parse_encoding_profile function causes
memory leakages when missing the 'type' field for streamprofile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5750>
This commit is contained in:
Jimmy Ohn 2023-12-01 17:55:28 +09:00 committed by Tim-Philipp Müller
parent f4ed87283b
commit c0bba84244

View file

@ -640,6 +640,8 @@ parse_encoding_profile (GKeyFile * in, gchar * parentprofilename,
proftype = g_key_file_get_value (in, profilename, "type", NULL);
if (!proftype) {
GST_WARNING ("Missing 'type' field for streamprofile %s", profilename);
g_free (pname);
g_free (description);
return NULL;
}