diff options
author | Vijay Bellur <vbellur@redhat.com> | 2013-08-11 22:41:27 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-08-11 22:43:36 +0530 |
commit | a4eaab2c175416f5462d44e56024728343bd3bb9 (patch) | |
tree | 8148c8ef3b08c5f350ba66d6ea1bcfcf68103e42 | |
parent | de91c3a68c8b6dd7f9c520001304cd514d5e28a0 (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.c | 7 |
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 6b5f7f86..e8a58ef5 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; } |