[sheepdog] [PATCH 1/4] farm: don't call close when we fail to open file

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Sep 6 03:26:37 CEST 2012


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

diff --git a/sheep/farm/snap.c b/sheep/farm/snap.c
index 88294cc..072843f 100644
--- a/sheep/farm/snap.c
+++ b/sheep/farm/snap.c
@@ -36,8 +36,8 @@ int snap_init(void)
 			ret = -1;
 			goto out;
 		}
-	}
-	close(fd);
+	} else
+		close(fd);
 
 out:
 	strbuf_release(&buf);
-- 
1.7.2.5




More information about the sheepdog mailing list