summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions.c8
1 files changed, 6 insertions, 2 deletions
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;
}