From: faizan <faizan.husain@xxxxxxxxxx> 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 Signed-off-by: Steve Dickson <steved@xxxxxxxxxx> --- libnfs4acl/nfs4_ace_from_string.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libnfs4acl/nfs4_ace_from_string.c b/libnfs4acl/nfs4_ace_from_string.c index 510ffee..d26c829 100644 --- a/libnfs4acl/nfs4_ace_from_string.c +++ b/libnfs4acl/nfs4_ace_from_string.c @@ -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, ":"); -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html