diff options
author | Amar Tumballi <amar@gluster.com> | 2012-02-14 12:26:29 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-02-14 02:43:26 -0800 |
commit | 58a538e99806ae84ec4d4bf03aa726302e16d07b (patch) | |
tree | 569f13e8491ff96de407a3e6a72d4e322cd6432d /xlators/features | |
parent | caa5db96282186333e294d93571eb49a3ed63f18 (diff) |
features/quota: fix a crash in fgetxattr() by checking for NULL arg
'name' can be NULL in getxattr() as it is overloaded in glusterfs
code to support listxattr() too.
Change-Id: I70ccee027828e9b2b08da770f513c4edc5c7a46b
BUG: 772601
Signed-off-by: Amar Tumballi <amar@gluster.com>
Reviewed-on: http://review.gluster.com/2743
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/quota/src/quota.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 8df51bbbbfe..3710e8f90cf 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -2022,7 +2022,7 @@ quota_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, { int32_t ret = 0; - if (strcasecmp (name, "trusted.limit.list") == 0) { + if (name && strcasecmp (name, "trusted.limit.list") == 0) { ret = quota_send_dir_limit_to_cli (frame, this, fd->inode, name); if (ret == 0) { |