From 90fa18f8e2081340c17a1a7176d22cbd4f7c4d6d Mon Sep 17 00:00:00 2001 From: infirit Date: Fri, 7 Nov 2014 13:10:17 +0100 Subject: gsm: Do not uselessly duplicate a string Based on gnome-session commit: 9f25b7599ba016f8da7275afa4c3f8e194678734 From: Vincent Untz --- mate-session/gsm-xsmp-client.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mate-session/gsm-xsmp-client.c b/mate-session/gsm-xsmp-client.c index 759e2ab..ec2db51 100644 --- a/mate-session/gsm-xsmp-client.c +++ b/mate-session/gsm-xsmp-client.c @@ -551,20 +551,20 @@ static void set_desktop_file_keys_from_client (GsmClient *client, GKeyFile *keyfile) { - SmProp *prop; - char *name; - char *comment; + SmProp *prop; + const char *name; + char *comment; prop = find_property (GSM_XSMP_CLIENT (client), SmProgram, NULL); if (prop) { - name = g_strdup (prop->vals[0].value); + name = prop->vals[0].value; } else { /* It'd be really surprising to reach this code: if we're here, * then the XSMP client already has set several XSMP * properties. But it could still be that SmProgram is not set. */ - name = g_strdup (_("Remembered Application")); + name = _("Remembered Application"); } comment = g_strdup_printf ("Client %s which was automatically saved", @@ -595,7 +595,6 @@ set_desktop_file_keys_from_client (GsmClient *client, G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY, TRUE); - g_free (name); g_free (comment); } -- cgit v1.2.1