From 6b8ed063bb8a551856d0e659fa9fe4f5afa48c19 Mon Sep 17 00:00:00 2001 From: Poornima Date: Tue, 4 Feb 2014 23:11:59 +0000 Subject: features/quota: Fix NULL dereference error reported by coverity. Change-Id: I48c1ebcb3261fa5da721e5b48d17c6c873df256d BUG: 789278 Signed-off-by: Poornima Reviewed-on: http://review.gluster.org/6907 Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- xlators/features/quota/src/quota.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/features/quota') 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); -- cgit