Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2019-04-25 21:02:43 +01:00
10 changed files with 45 additions and 61 deletions

View File

@ -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);
}