From: Christian Brauner Date: Mon, 28 Sep 2015 20:52:27 +0000 (+0200) Subject: Remove unnecessary call to free() X-Git-Tag: lxc-2.0.0.beta1~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2e4dddd71d427f9cacbab4016ffe18b0e4a4a0a;p=thirdparty%2Flxc.git Remove unnecessary call to free() Freeing memory when calloc() fails doesn't make sense Signed-off-by: Christian Brauner Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/lxc_destroy.c b/src/lxc/lxc_destroy.c index 0eeff5128..f1830fd5d 100644 --- a/src/lxc/lxc_destroy.c +++ b/src/lxc/lxc_destroy.c @@ -168,7 +168,6 @@ static int do_destroy_with_snapshots(struct lxc_container *c) if (!buf) { SYSERROR("failed to allocate memory"); close(fd); - free(buf); return -1; }