diff options
author | sabetts <sabetts> | 2004-10-05 16:32:58 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2004-10-05 16:32:58 +0000 |
commit | 6b74028d8783beebd7e9532033608ce48f4f44fe (patch) | |
tree | 1644ebccf2cefc64e7655cff146abf821a904541 | |
parent | 9e4afcbbc2a5aa949bd94a65f0bf931513005386 (diff) | |
download | ratpoison-6b74028d8783beebd7e9532033608ce48f4f44fe.zip |
new command, sselect
(cmd_sselect): new function. added prototype.
(cmd_set): free 'var' at the appropriate places.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/actions.c | 8 |
2 files changed, 7 insertions, 2 deletions
@@ -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; } |