summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2013-08-11 22:41:27 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2013-08-12 00:48:15 +0530
commit488815e85900ce848e3d4c7da0af646e909e22f0 (patch)
treee31288267fdf40bcadcb0bbf94f4415828882562
parenta959fb15a6121ffbeaf6ef8a31a2165164ee4540 (diff)
features/marker: Fix an incorrect NULL check
Change-Id: If9bb12b352af5a691bd17fc51f0273685ecb12e8 BUG: 969461 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--xlators/features/marker/src/marker-quota.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index db10586c..f627011f 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -1929,7 +1929,7 @@ fr_destroy:
return -1;
}
-static int
+int
mq_prepare_txn_frame (xlator_t *this, loc_t *loc,
quota_inode_ctx_t *ctx,
inode_contribution_t *contri,
@@ -1939,7 +1939,7 @@ mq_prepare_txn_frame (xlator_t *this, loc_t *loc,
int ret = -1;
quota_local_t *local = NULL;
- if (!this || !loc || new_frame)
+ if (!this || !loc || !new_frame)
goto err;
frame = create_frame (this, this->ctx->pool);
@@ -1969,9 +1969,10 @@ mq_prepare_txn_frame (xlator_t *this, loc_t *loc,
ret = 0;
*new_frame = frame;
+ return ret;
+
fr_destroy:
QUOTA_STACK_DESTROY (frame, this);
-
err:
return ret;
}