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/5744>
This commit is contained in:
Jimmy Ohn 2023-12-01 17:55:28 +09:00 committed by GStreamer Marge Bot
parent 041e0c6cab
commit 2c19c92041

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;
}