From d7374684f648c1e45d695454f95a65acfe6d04e8 Mon Sep 17 00:00:00 2001 From: Nandaja Varma Date: Mon, 9 Feb 2015 17:16:22 +0530 Subject: marker, quota: Fixing the coverity issues Coverity CIDs: 1124601 1124690 1134008 1134009 Change-Id: I93992b11bb6d8f7edd065f602aec2cd7a8b433d0 BUG: 789278 Signed-off-by: Nandaja Varma Reviewed-on: http://review.gluster.org/9614 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/marker/src/marker-quota.c | 3 ++- xlators/features/marker/src/marker.c | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'xlators/features/marker') diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 63aa4efa44d..6034b963dfe 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -1257,7 +1257,8 @@ mq_set_inode_xattr (xlator_t *this, loc_t *loc) return 0; err: - QUOTA_STACK_DESTROY (frame, this); + if (frame) + QUOTA_STACK_DESTROY (frame, this); return 0; } diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index c1db70369a8..dc56714a94c 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -546,6 +546,9 @@ marker_create_frame (xlator_t *this, marker_local_t *local) frame = create_frame (this, this->ctx->pool); + if (!frame) + return -1; + frame->local = (void *) local; marker_start_setxattr (frame, this); -- cgit