Skip to contentSkip to conversation

nfs4_setfacl failed with unexpected messages

PATCH New Steve Dickson 1 participant 1 message Dec 22, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfs4_setfacl failed with unexpected messages

From: faizan <[email protected]>

When the format of the input file is incorrect nfs4_setfacl fails with a *** glibc detected *** error.

See: https://bugzilla.redhat.com/show_bug.cgi?id=693422

---
 libnfs4acl/nfs4_ace_from_string.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
libnfs4acl/nfs4_ace_from_string.c +5 -4
index 510ffee..d26c829 100644
@@ -86,9 +86,10 @@ free_fields(char *fields[NUMFIELDS])
 {
 	int i;
 
-	for (i = 0; i < NUMFIELDS; i++)
-		if (fields[i] != NULL)
-			free(fields[i]);
+	for (i = 0; i < NUMFIELDS; i++) {
+		free(fields[i]);
+		fields[i] = NULL;
+	}
 }
 
 int
@@ -107,7 +108,7 @@ parse_alloc_fields(char *buf, char *fields[NUMFIELDS])
 			count++;
 	}
 	if (count != 3)
-		goto out_free;
+		return -EINVAL;
 
 	for (i = 0; i < NUMFIELDS; i++) {
 		field = strsep(&buf, ":");
Signature · 1 line
1.7.7.3