summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
{