coverity: #1425819

Resource leak Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 1175ca91
...@@ -819,6 +819,7 @@ static void ls_print_fancy_format(struct ls *l, struct lengths *lht, ...@@ -819,6 +819,7 @@ static void ls_print_fancy_format(struct ls *l, struct lengths *lht,
strcasecmp(*s, "GROUPS") && strcasecmp(*s, "INTERFACE") && strcasecmp(*s, "GROUPS") && strcasecmp(*s, "INTERFACE") &&
strcasecmp(*s, "IPV4") && strcasecmp(*s, "IPV6") && strcasecmp(*s, "IPV4") && strcasecmp(*s, "IPV6") &&
strcasecmp(*s, "UNPRIVILEGED")) { strcasecmp(*s, "UNPRIVILEGED")) {
lxc_free_array((void **)tmp, free);
fprintf(stderr, "Invalid key: %s\n", *s); fprintf(stderr, "Invalid key: %s\n", *s);
return; return;
} }
...@@ -895,6 +896,8 @@ static void ls_print_fancy_format(struct ls *l, struct lengths *lht, ...@@ -895,6 +896,8 @@ static void ls_print_fancy_format(struct ls *l, struct lengths *lht,
} }
printf("\n"); printf("\n");
} }
lxc_free_array((void **)tmp, free);
} }
static void ls_print_table(struct ls *l, struct lengths *lht, static void ls_print_table(struct ls *l, struct lengths *lht,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment