Skip to content

Commit

Permalink
coverity: Silence potential null-deref warning
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
stgraber committed Feb 15, 2014
1 parent 9de2ebe commit bdcb7aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lxc/lxc_attach.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit bdcb7aa

Please sign in to comment.