Commit 76e6c9d3 by Stéphane Graber

coverity: Fix two memory leaks

parent d1c6b3b5
...@@ -2104,10 +2104,12 @@ static int aufs_mount(struct bdev *bdev) ...@@ -2104,10 +2104,12 @@ static int aufs_mount(struct bdev *bdev)
ret = snprintf(runpath, len, "%s/lxc", rundir); ret = snprintf(runpath, len, "%s/lxc", rundir);
if (ret < 0 || ret >= len) { if (ret < 0 || ret >= len) {
free(mntdata); free(mntdata);
free(rundir);
return -1; return -1;
} }
if (mkdir_p(runpath, 0755) < 0) { if (mkdir_p(runpath, 0755) < 0) {
free(mntdata); free(mntdata);
free(rundir);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment