summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorJunaid <junaid@gluster.com>2011-04-04 12:03:04 +0000
committerVijay Bellur <vijay@gluster.com>2011-04-07 11:40:01 -0700
commit7a32aa912ea4e49d3ef922ec6e0cb3d394109962 (patch)
tree23ee4867e0178f5c2e2c9e132abe3fc93c0fd697 /xlators
parentee494c7519e5da09b66003de514db5e700c3001d (diff)
features/marker: Check for NULL before dereferencing pointers stored in local.
Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@gluster.com> BUG: 2607 (Fileop fails when quota is enabled) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2607
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/marker/src/marker-quota.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 16139fc24f8..afb93c6ee57 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -489,14 +489,14 @@ quota_dirty_inode_readdir (call_frame_t *frame,
{
quota_local_t *local = NULL;
+ local = frame->local;
+
if (op_ret == -1) {
local->err = -1;
release_lock_on_dirty_inode (frame, NULL, this, 0, 0);
return 0;
}
- local = frame->local;
-
if (local->fd == NULL)
local->fd = fd_ref (fd);
@@ -1224,6 +1224,9 @@ quota_fetch_child_size_and_contri (call_frame_t *frame, void *cookie,
goto err;
}
+ VALIDATE_OR_GOTO (local->ctx, err);
+ VALIDATE_OR_GOTO (local->contri, err);
+
gf_log (this->name, GF_LOG_DEBUG, "%s marked dirty", local->parent_loc.path);
priv = this->private;