diff options
Diffstat (limited to 'cmd-show-options.c')
-rw-r--r-- | cmd-show-options.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c index 59d9f9f5..642b3f89 100644 --- a/cmd-show-options.c +++ b/cmd-show-options.c @@ -161,8 +161,8 @@ cmd_show_options_print(struct cmd *self, struct cmdq_item *item, struct options_entry *o, int idx) { struct options_array_item *a; - const char *name, *value; - char *tmp, *escaped; + const char *name; + char *value, *tmp, *escaped; if (idx != -1) { xasprintf(&tmp, "%s[%d]", options_name(o), idx); @@ -190,6 +190,7 @@ cmd_show_options_print(struct cmd *self, struct cmdq_item *item, free(escaped); } else cmdq_print(item, "%s %s", name, value); + free(value); free(tmp); } |