]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: Silence potential null-deref warning
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 14 Feb 2014 20:59:23 +0000 (15:59 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Sat, 15 Feb 2014 00:13:43 +0000 (19:13 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc_attach.c

index e3e89c4ddb7d9184c1f511b6c6fdfc8f9b52cd77..33d5e9135991326abfa26ea951e6ca42767d1228 100644 (file)
@@ -78,7 +78,8 @@ static int add_to_simple_array(char ***array, ssize_t *capacity, char *value)
                *capacity = new_capacity;
        }
 
-       (*array)[count] = value;
+       if (array)
+               (*array)[count] = value;
        return 0;
 }