[nautilus/wip/corey/dnd_features: 5/6] files-view-dnd: Stop leaking container_uri




commit be4105380929946fd29e55ca80720108431397da
Author: Corey Berla <corey berla me>
Date:   Thu Aug 18 12:10:55 2022 -0700

    files-view-dnd: Stop leaking container_uri

 src/nautilus-files-view-dnd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/nautilus-files-view-dnd.c b/src/nautilus-files-view-dnd.c
index 0f305c832..69254be65 100644
--- a/src/nautilus-files-view-dnd.c
+++ b/src/nautilus-files-view-dnd.c
@@ -349,9 +349,8 @@ nautilus_files_view_drop_proxy_received_uris (NautilusFilesView *view,
                                               const char        *target_uri,
                                               GdkDragAction      action)
 {
-    char *container_uri;
+    g_autofree char *container_uri = NULL;
 
-    container_uri = NULL;
     if (target_uri == NULL)
     {
         container_uri = nautilus_files_view_get_backing_uri (view);
@@ -378,8 +377,6 @@ nautilus_files_view_drop_proxy_received_uris (NautilusFilesView *view,
     nautilus_files_view_move_copy_items (view, source_uri_list,
                                          target_uri != NULL ? target_uri : container_uri,
                                          action);
-
-    g_free (container_uri);
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]