diff options
author | Poornima <pgurusid@redhat.com> | 2014-02-04 23:11:59 +0000 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-02-10 16:35:54 -0800 |
commit | 6b8ed063bb8a551856d0e659fa9fe4f5afa48c19 (patch) | |
tree | d1164c2b216b59aea08f31c361d181ebc31bd00a | |
parent | d4e7dd1d2fe2a76318ddd0a7200a9d4fa51dbaf7 (diff) |
features/quota: Fix NULL dereference error reported by coverity.
Change-Id: I48c1ebcb3261fa5da721e5b48d17c6c873df256d
BUG: 789278
Signed-off-by: Poornima <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/6907
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r-- | xlators/features/quota/src/quota.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 5224c475bdc..bb5dc7aba1d 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -3387,6 +3387,10 @@ quota_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, if (hard_lim > 0) { local = quota_local_new (); + if (local == NULL) { + op_errno = ENOMEM; + goto err; + } frame->local = local; local->loc.inode = inode_ref (fd->inode); |