[sheepdog] [PATCH] sheep: fix vdi exsitence check

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Aug 23 15:35:13 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 sheep/vdi.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sheep/vdi.c b/sheep/vdi.c
index aa5134b..e5c27fb 100644
--- a/sheep/vdi.c
+++ b/sheep/vdi.c
@@ -181,10 +181,11 @@ int vdi_exist(uint32_t vid)
 		goto out;
 	}
 
-	if (*inode->name == '\0')
+	if (*inode->name == '\0') {
 		ret = 0;
+		goto out;
+	}
 	ret = 1;
-
 out:
 	free(inode);
 	return ret;
-- 
1.7.2.5




More information about the sheepdog mailing list