summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2004-10-05 16:32:58 +0000
committersabetts <sabetts>2004-10-05 16:32:58 +0000
commit6b74028d8783beebd7e9532033608ce48f4f44fe (patch)
tree1644ebccf2cefc64e7655cff146abf821a904541
parent9e4afcbbc2a5aa949bd94a65f0bf931513005386 (diff)
downloadratpoison-6b74028d8783beebd7e9532033608ce48f4f44fe.zip
new command, sselect
(cmd_sselect): new function. added prototype. (cmd_set): free 'var' at the appropriate places.
-rw-r--r--ChangeLog1
-rw-r--r--src/actions.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1b3a3c4..2b34853 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
* src/actions.c: new command, sselect
(cmd_sselect): new function. added prototype.
+ (cmd_set): free 'var' at the appropriate places.
* src/events.c (property_notify): pass the root window to
receive_command.
diff --git a/src/actions.c b/src/actions.c
index 821efa9..3278374 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -4309,19 +4309,23 @@ cmd_set (int interactive, char *data)
if (!strcmp (var, set_vars[i].var))
{
result = set_vars[i].set_fn (rest);
- free (var);
/* If rest is not NULL then result must be NULL. */
if (rest == NULL)
{
if (interactive)
{
marked_message_printf (0, 0, " %s: %s ", var, result);
+ free (var);
free (result);
return NULL;
}
else
- return result;
+ {
+ free (var);
+ return result;
+ }
}
+ free (var);
free (rest);
return NULL;
}