summaryrefslogtreecommitdiffstats
path: root/cmd-show-options.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-04-25 21:02:43 +0100
committerThomas Adam <thomas@xteddy.org>2019-04-25 21:02:43 +0100
commit7c4a2253e89dd26018de489301e46d8425893a78 (patch)
tree50a72e4f59f1d27092b9e1c29fb0d0a1228cfe62 /cmd-show-options.c
parentf2c0605d6d7051898318703142af4ceb7e3f845f (diff)
parent2d65bbd94129c4542394a83151cb1a131c3c7871 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-show-options.c')
-rw-r--r--cmd-show-options.c5
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);
}