summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authormonsta <[email protected]>2014-11-08 14:47:49 +0300
committerStefano Karapetsas <[email protected]>2014-11-11 12:20:55 +0100
commit42c5b914135e2265e46c45abbb71ea819b07ab37 (patch)
tree59b68565c064b4c5be053720f83220745459aaaf /mate-session
parent4b955633d160456b5494c077fc4fb55fade3731f (diff)
downloadmate-session-manager-42c5b914135e2265e46c45abbb71ea819b07ab37.tar.bz2
mate-session-manager-42c5b914135e2265e46c45abbb71ea819b07ab37.tar.xz
Properly init boolean variable and don't leak memory
Closes https://github.com/mate-desktop/mate-session-manager/pull/67
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/gsm-dbus-client.c2
-rw-r--r--mate-session/gsm-util.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/mate-session/gsm-dbus-client.c b/mate-session/gsm-dbus-client.c
index 2ffaa84..8fd2abd 100644
--- a/mate-session/gsm-dbus-client.c
+++ b/mate-session/gsm-dbus-client.c
@@ -599,7 +599,7 @@ dbus_client_cancel_end_session (GsmClient *client,
{
GsmDBusClient *dbus_client = (GsmDBusClient *) client;
DBusMessage *message;
- gboolean ret;
+ gboolean ret = FALSE;
/* unicast the signal to only the registered bus name */
message = dbus_message_new_signal (gsm_client_peek_id (client),
diff --git a/mate-session/gsm-util.c b/mate-session/gsm-util.c
index d45ca8d..6320b24 100644
--- a/mate-session/gsm-util.c
+++ b/mate-session/gsm-util.c
@@ -164,9 +164,10 @@ gsm_util_get_empty_tmp_session_dir (void)
dir = g_dir_open (tmp, 0, NULL);
if (dir) {
while ((filename = g_dir_read_name (dir))) {
- char *path = g_build_filename (tmp, filename,
+ gchar *path = g_build_filename (tmp, filename,
NULL);
g_unlink (path);
+ g_free (path);
}
g_dir_close (dir);
}