mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
project: don't leak GFileInfo
https://bugzilla.gnome.org/show_bug.cgi?id=755862
This commit is contained in:
parent
731bda1592
commit
ecb2a7c820
1 changed files with 4 additions and 3 deletions
|
@ -269,9 +269,8 @@ _add_media_new_paths_recursing (const gchar * value)
|
||||||
|
|
||||||
GST_INFO ("Adding folder: %s", value);
|
GST_INFO ("Adding folder: %s", value);
|
||||||
g_ptr_array_add (new_paths, g_strdup (value));
|
g_ptr_array_add (new_paths, g_strdup (value));
|
||||||
for (info = g_file_enumerator_next_file (fenum, NULL, NULL);
|
info = g_file_enumerator_next_file (fenum, NULL, NULL);
|
||||||
info; info = g_file_enumerator_next_file (fenum, NULL, NULL)) {
|
while (info != NULL) {
|
||||||
|
|
||||||
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) {
|
if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY) {
|
||||||
GFile *f = g_file_enumerator_get_child (fenum, info);
|
GFile *f = g_file_enumerator_get_child (fenum, info);
|
||||||
gchar *uri = g_file_get_uri (f);
|
gchar *uri = g_file_get_uri (f);
|
||||||
|
@ -280,6 +279,8 @@ _add_media_new_paths_recursing (const gchar * value)
|
||||||
gst_object_unref (f);
|
gst_object_unref (f);
|
||||||
g_free (uri);
|
g_free (uri);
|
||||||
}
|
}
|
||||||
|
g_object_unref (info);
|
||||||
|
info = g_file_enumerator_next_file (fenum, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in a new issue