summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-04-05 14:24:59 +0000
committerVijay Bellur <vijay@gluster.com>2011-04-06 11:10:23 -0700
commit35dea20e40958ebbf018354e040570e654eb6bfc (patch)
treebe63a8708370625e5ec628b18b04825fbfc20129 /xlators/features/quota
parent06c954a910fe8749b362490c62e5b49be5b0c385 (diff)
check buf for NULL before accessing itv3.2.0qa8
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2675 ([glusterfs-3.2.0qa7]: glusterfs client crashed) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2675
Diffstat (limited to 'xlators/features/quota')
-rw-r--r--xlators/features/quota/src/quota.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 0b0f8ce9364..6400505add2 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -463,7 +463,8 @@ __quota_init_inode_ctx (inode_t *inode, int64_t limit, xlator_t *this,
QUOTA_ALLOC_OR_GOTO (ctx, quota_inode_ctx_t, out);
ctx->limit = limit;
- ctx->buf = *buf;
+ if (buf)
+ ctx->buf = *buf;
LOCK_INIT(&ctx->lock);