From 2c19c920416d99f1d7d436921afbaa06ffdea4b4 Mon Sep 17 00:00:00 2001 From: Jimmy Ohn Date: Fri, 1 Dec 2023 17:55:28 +0900 Subject: [PATCH] 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: --- .../gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c index bd9dcdf302..1b6e60d8a5 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/pbutils/encoding-target.c @@ -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; }