Skip to content

Commit

Permalink
Fix reallocation calculation
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christianvanbrauner@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
brauner authored and stgraber committed Sep 21, 2015
1 parent c4532a2 commit ffe9a25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/lxc_info.c
Expand Up @@ -53,7 +53,7 @@ static int my_parser(struct lxc_arguments* args, int c, char* arg)
char **newk;
switch (c) {
case 'c':
newk = realloc(key, keys+1 * sizeof(key[0]));
newk = realloc(key, (keys + 1) * sizeof(key[0]));
if (!newk)
return -1;
key = newk;
Expand Down

0 comments on commit ffe9a25

Please sign in to comment.