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>
This commit is contained in:
Poornima 2014-02-04 23:11:59 +00:00 committed by Vijay Bellur
parent d4e7dd1d2f
commit 6b8ed063bb

View File

@ -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);