diff options
author | António Fernandes <antoniof@gnome.org> | 2020-12-20 00:49:16 +0000 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2021-01-05 08:50:24 +0000 |
commit | de4d100359310165f5447e3b55ad9e15a63db72b (patch) | |
tree | e8b2b011bc29eed9f07696a125e61ce20677f720 | |
parent | 400f6d499ddcf58d742ac169565268bdb06caff7 (diff) | |
download | nautilus-de4d100359310165f5447e3b55ad9e15a63db72b.tar.gz |
bookmark-list: Unref obj on each loop iteration
Autocleanup works only at the end of the scope it's declared.
So, it must be declared inside the loop to work as intended here.
-rw-r--r-- | src/nautilus-bookmark-list.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nautilus-bookmark-list.c b/src/nautilus-bookmark-list.c index a0698d691..b2d7e66ea 100644 --- a/src/nautilus-bookmark-list.c +++ b/src/nautilus-bookmark-list.c @@ -258,7 +258,6 @@ nautilus_bookmark_list_item_with_location (NautilusBookmarkList *bookmarks, guint *index) { GList *node; - g_autoptr (GFile) bookmark_location = NULL; NautilusBookmark *bookmark; guint idx; @@ -269,6 +268,8 @@ nautilus_bookmark_list_item_with_location (NautilusBookmarkList *bookmarks, for (node = bookmarks->list; node != NULL; node = node->next) { + g_autoptr (GFile) bookmark_location = NULL; + bookmark = node->data; bookmark_location = nautilus_bookmark_get_location (bookmark); |