From 488815e85900ce848e3d4c7da0af646e909e22f0 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Sun, 11 Aug 2013 22:41:27 +0530 Subject: features/marker: Fix an incorrect NULL check Change-Id: If9bb12b352af5a691bd17fc51f0273685ecb12e8 BUG: 969461 Signed-off-by: Vijay Bellur --- xlators/features/marker/src/marker-quota.c | 7 ++++--- 1 file 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; } -- cgit