]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: Fix two memory leaks
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 20 Feb 2014 15:42:57 +0000 (10:42 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 20 Feb 2014 18:51:17 +0000 (13:51 -0500)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/bdev.c

index 587f0672a3fb412a408e90abce8ea5cbef96c47f..6d8860967264415a17d21649e6fd865afd4590ed 100644 (file)
@@ -2104,10 +2104,12 @@ static int aufs_mount(struct bdev *bdev)
        ret = snprintf(runpath, len, "%s/lxc", rundir);
        if (ret < 0 || ret >= len) {
                free(mntdata);
+               free(rundir);
                return -1;
        }
        if (mkdir_p(runpath, 0755) < 0) {
                free(mntdata);
+               free(rundir);
                return -1;
        }