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



commit b8bad36e40339905aa6b5bc50694d45672b67660
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 290033e..03fce27 100644
--- a/common/gvfsmountinfo.c
+++ b/common/gvfsmountinfo.c
@@ -533,7 +533,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]