From: Christian Brauner Date: Thu, 28 Jan 2021 17:13:54 +0000 (+0100) Subject: attach: s/calloc/zalloc/g X-Git-Tag: lxc-5.0.0~313^2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89b7bfe3ff1d8fc084f9ebff0736b6ac4b691391;p=thirdparty%2Flxc.git attach: s/calloc/zalloc/g Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 3b2f49ee3..e69338f0a 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -84,7 +84,7 @@ static struct attach_context *get_attach_context(pid_t pid) if (!proc_file) return log_error_errno(NULL, errno, "Failed to open %s", proc_fn); - info = calloc(1, sizeof(*info)); + info = zalloc(sizeof(*info)); if (!info) return NULL; @@ -269,7 +269,7 @@ static int lxc_attach_set_environment(struct attach_context *ctx, for (count = 0; extra_keep[count]; count++) ; - extra_keep_store = calloc(count, sizeof(char *)); + extra_keep_store = zalloc(count * sizeof(char *)); if (!extra_keep_store) return -1;