summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2012-11-23 08:57:33 +0100
committerDanny Baumann <dannybaumann@web.de>2012-11-23 08:57:33 +0100
commit5fbec5447436c3e12e92944171f1b73c8ffa6e90 (patch)
treeba0406bb6129dec5304ecd1b9702b524faf49673
parentef955e27a0c532101fa4548ad6f25ea173487314 (diff)
downloadsession-compiz-0.8.tar.gz
session-compiz-0.8.tar.bz2
Fix memleak.compiz-0.8
-rw-r--r--session.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/session.c b/session.c
index 93f91a0..aa87cbd 100644
--- a/session.c
+++ b/session.c
@@ -402,14 +402,20 @@ sessionAddWindowNode (CompWindow *w,
if (!clientId && !sd->opt[SESSION_DISPLAY_OPTION_SAVE_LEGACY].value.b)
return;
- command = sessionGetClientLeaderProperty (w, sd->commandAtom);
-
+ command = sessionGetClientLeaderProperty (w, sd->commandAtom);
if (!clientId && !command)
return;
node = xmlNewChild (rootNode, NULL, BAD_CAST "window", NULL);
if (!node)
+ {
+ if (clientId)
+ free (clientId);
+ if (command)
+ free (command);
+
return;
+ }
if (clientId)
{