gstreamer: Fix minor memory leak in error path for internal path depth helper function

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4541>
This commit is contained in:
Sebastian Dröge 2023-05-04 00:14:29 +03:00
parent f9dff72726
commit 914c094764
2 changed files with 2 additions and 0 deletions

View file

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

View file

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