From: Christian Brauner Date: Fri, 15 Jun 2018 11:37:47 +0000 (+0200) Subject: coverity: #1437027 X-Git-Tag: lxc-2.0.10~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fb3fd4452c2af20f8832d6ebfc4b2b1de7b9cb8;p=thirdparty%2Flxc.git coverity: #1437027 Read from pointer after free Signed-off-by: Christian Brauner --- diff --git a/src/lxc/tools/lxc_ls.c b/src/lxc/tools/lxc_ls.c index 5c86d5d07..8aaf2c00d 100644 --- a/src/lxc/tools/lxc_ls.c +++ b/src/lxc/tools/lxc_ls.c @@ -807,8 +807,8 @@ static void ls_print_fancy_format(struct ls *l, struct lengths *lht, strcasecmp(*s, "SWAP") && strcasecmp(*s, "AUTOSTART") && strcasecmp(*s, "GROUPS") && strcasecmp(*s, "INTERFACE") && strcasecmp(*s, "IPV4") && strcasecmp(*s, "IPV6")) { - lxc_free_array((void **)tmp, free); fprintf(stderr, "Invalid key: %s\n", *s); + lxc_free_array((void **)tmp, free); return; } }