nfs4_setfacl failed with unexpected messages
Subsystems (2)
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
Signed-off-by Steve Dickson <[email protected]>
--- libnfs4acl/nfs4_ace_from_string.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
libnfs4acl/nfs4_ace_from_string.c +5 -4
@@ -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