From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH 1/1] nfs4_setfacl failed with unexpected messages
Date: Thu, 22 Dec 2011 09:49:10 -0500 [thread overview]
Message-ID: <1324565350-9764-1-git-send-email-steved@redhat.com> (raw)
From: faizan <faizan.husain@in.ibm.com>
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@redhat.com>
---
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
reply other threads:[~2011-12-22 14:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324565350-9764-1-git-send-email-steved@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).