summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-07 13:10:17 +0100
committerinfirit <[email protected]>2014-11-07 14:31:51 +0100
commit90fa18f8e2081340c17a1a7176d22cbd4f7c4d6d (patch)
treef17705372840bac2a7fb09aee81a85785be4a54d /mate-session
parentacbe76ca6d576c397112c08b86bb9c301102f4ab (diff)
downloadmate-session-manager-90fa18f8e2081340c17a1a7176d22cbd4f7c4d6d.tar.bz2
mate-session-manager-90fa18f8e2081340c17a1a7176d22cbd4f7c4d6d.tar.xz
gsm: Do not uselessly duplicate a string
Based on gnome-session commit: 9f25b7599ba016f8da7275afa4c3f8e194678734 From: Vincent Untz <[email protected]>
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/gsm-xsmp-client.c11
1 files 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);
}