]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Remove unnecessary call to free()
authorChristian Brauner <christianvanbrauner@gmail.com>
Mon, 28 Sep 2015 20:52:27 +0000 (22:52 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 28 Sep 2015 21:05:00 +0000 (17:05 -0400)
Freeing memory when calloc() fails doesn't make sense

Signed-off-by: Christian Brauner <christianvanbrauner@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc_destroy.c

index 0eeff5128cb7e87972c833b2397957b483cdc92a..f1830fd5d4d64c1768ca5010efb8292ee4ab250c 100644 (file)
@@ -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;
                }