[glib] gdesktopappinfo: Don't double free sn_id



commit 2d96503898745dbf88bec9ff57649b2d3853a851
Author: Colin Walters <walters verbum org>
Date:   Sat Apr 12 13:26:29 2014 -0400

    gdesktopappinfo: Don't double free sn_id
    
    Not sure why mclasen added a g_free() in that path, it was just wrong.
    We free it correctly later.

 gio/gdesktopappinfo.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 3d5fe01..f7208d3 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -2183,10 +2183,7 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo            *info,
                                                                   G_APP_INFO (info),
                                                                   launched_files);
               if (sn_id)
-                {
-                  envp = g_environ_setenv (envp, "DESKTOP_STARTUP_ID", sn_id, TRUE);
-                  g_free (sn_id);
-                }
+                envp = g_environ_setenv (envp, "DESKTOP_STARTUP_ID", sn_id, TRUE);
             }
 
           g_list_free_full (launched_files, g_object_unref);


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