summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2011-04-01 02:56:18 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-04-05 00:45:04 -0700
commitff9e63c0975e786a69e5ecede78b178f20baceb7 (patch)
treed7ff9909018a45ff46e38f758b010a581263d90d /xlators/features/quota
parentf338193a707ae5b6b5ab6f820bea32612c4311bb (diff)
features/quota: add NULL check before doing strcasecmp
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2646 (glusterfs-client crashes during getxattr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2646
Diffstat (limited to 'xlators/features/quota')
-rw-r--r--xlators/features/quota/src/quota.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index e7dac765da2..8a8523a890e 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -1950,7 +1950,7 @@ quota_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
{
int32_t ret = 0;
- if (strcasecmp (name, "trusted.limit.list") == 0) {
+ if ((name != NULL) && strcasecmp (name, "trusted.limit.list") == 0) {
ret = quota_send_dir_limit_to_cli (frame, this, loc->inode,
name);
if (ret == 0)