[Sheepdog] [PATCH] collie: don't read unused value from STDIN for vdi setattr -d

Chris Webb chris at arachsys.com
Mon Jun 13 19:15:55 CEST 2011


Signed-off-by: Chris Webb <chris at arachsys.com>
---
 collie/collie.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/collie/collie.c b/collie/collie.c
index e0ecc78..606cb30 100644
--- a/collie/collie.c
+++ b/collie/collie.c
@@ -900,7 +900,7 @@ static int vdi_setattr(int argc, char **argv)
 	}
 
 	value = argv[optind++];
-	if (!value) {
+	if (!value && !vdi_cmd_data.delete) {
 		value = malloc(SD_MAX_VDI_ATTR_VALUE_LEN);
 		if (!value) {
 			fprintf(stderr, "failed to allocate memory\n");
-- 
1.7.4.1




More information about the sheepdog mailing list