[gvfs/gnome-3-22] common: Fix potential crash caused by missing g_strdup



commit 14985f3018d4e0a3fdbf055ca5b930cfe345ec9c
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Mar 27 19:06:00 2017 +0200

    common: Fix potential crash caused by missing g_strdup
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747412

 common/gvfsmountinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/common/gvfsmountinfo.c b/common/gvfsmountinfo.c
index e3350c1..0d1f326 100644
--- a/common/gvfsmountinfo.c
+++ b/common/gvfsmountinfo.c
@@ -544,7 +544,7 @@ bdmv_metadata_thread (GSimpleAsyncResult *result,
       meta = bd_get_meta (bd);
 
       if (meta != NULL && name == NULL && meta->di_name && *meta->di_name)
-        name = meta->di_name;
+        name = g_strdup (meta->di_name);
 
       if (meta != NULL && icon == NULL)
         icon = g_strdup (get_icon (meta));


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