From 914c094764c2c75f35b199a410e9da16bcb6519f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 4 May 2023 00:14:29 +0300 Subject: [PATCH] gstreamer: Fix minor memory leak in error path for internal path depth helper function Part-of: --- subprojects/gstreamer/gst/gstregistry.c | 1 + subprojects/gstreamer/libs/gst/net/gstptpclock.c | 1 + 2 files changed, 2 insertions(+) diff --git a/subprojects/gstreamer/gst/gstregistry.c b/subprojects/gstreamer/gst/gstregistry.c index 8a62cca6ce..c84de1d7f6 100644 --- a/subprojects/gstreamer/gst/gstregistry.c +++ b/subprojects/gstreamer/gst/gstregistry.c @@ -1642,6 +1642,7 @@ priv_gst_count_directories (const char *filepath) if (len >= 3 && G_IS_DIR_SEPARATOR (tmp[0]) && G_IS_DIR_SEPARATOR (tmp[1]) && !G_IS_DIR_SEPARATOR (tmp[2])) { GST_WARNING ("found a UNC share path, ignoring"); + g_clear_pointer (&tmp, g_free); return 0; } diff --git a/subprojects/gstreamer/libs/gst/net/gstptpclock.c b/subprojects/gstreamer/libs/gst/net/gstptpclock.c index d1a3f0e955..daf570830a 100644 --- a/subprojects/gstreamer/libs/gst/net/gstptpclock.c +++ b/subprojects/gstreamer/libs/gst/net/gstptpclock.c @@ -2152,6 +2152,7 @@ count_directories (const char *filepath) if (len >= 3 && G_IS_DIR_SEPARATOR (tmp[0]) && G_IS_DIR_SEPARATOR (tmp[1]) && !G_IS_DIR_SEPARATOR (tmp[2])) { GST_WARNING ("found a UNC share path, ignoring"); + g_clear_pointer (&tmp, g_free); return 0; }