[nautilus] file-operations: do not free string literal



commit 870179bb894ddff2b191726613a97220e7d32dab
Author: Felipe Borges <felipeborges gnome org>
Date:   Fri Feb 24 17:42:58 2017 +0100

    file-operations: do not free string literal
    
    The "status" string was using the g_autofree macro to ensure its
    automatic cleanup, but its attributions were all string literals.
    
    We should live by the mantra "WE SHALL NEVER FREE MEMORY THAT WE
    DIDN'T MALLOC(ED)".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779188

 src/nautilus-file-operations.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index ac6d491..c2ab8c8 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -3645,7 +3645,7 @@ report_copy_progress (CopyMoveJob  *copy_job,
     guint64 now;
     CommonJob *job;
     gboolean is_move;
-    g_autofree gchar *status = NULL;
+    gchar *status;
     char *details;
     gchar *tmp;
 


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