]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
lxc: do cleanup when failed to bind fs as read-only
authorChen Hanxiao <chenhanxiao@cn.fujitsu.com>
Mon, 30 Sep 2013 09:06:25 +0000 (17:06 +0800)
committerEric Blake <eblake@redhat.com>
Mon, 30 Sep 2013 19:30:43 +0000 (13:30 -0600)
We forgot to do cleanup when lxcContainerMountFSTmpfs
failed to bind fs as read-only.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
src/lxc/lxc_container.c

index c60f5d8a5dd78eab396cc89f56f51d39dafb2439..b1f429cd208d91f1252952ec60ec1a89ab1de5f2 100644 (file)
@@ -1451,6 +1451,7 @@ static int lxcContainerMountFSTmpfs(virDomainFSDefPtr fs,
             virReportSystemError(errno,
                                  _("Failed to make directory %s readonly"),
                                  fs->dst);
+            goto cleanup;
         }
     }