From: Christian Brauner Date: Mon, 21 Sep 2015 07:53:43 +0000 (+0200) Subject: Fix reallocation calculation X-Git-Tag: lxc-1.0.8~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=622f4ccae68081925cbd5f73ac68bb94d2581c09;p=thirdparty%2Flxc.git Fix reallocation calculation Signed-off-by: Christian Brauner Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/lxc_info.c b/src/lxc/lxc_info.c index 9f1c46991..58ff619f2 100644 --- a/src/lxc/lxc_info.c +++ b/src/lxc/lxc_info.c @@ -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;