Message ID | 4E0C7B26.9030807@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/libnfs4acl/nfs4_ace_from_string.c b/libnfs4acl/nfs4_ace_from_string.c index 9d877fb..b74b1a9 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, ":");