summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker.c
diff options
context:
space:
mode:
authorHari Gowtham <hgowtham@redhat.com>2018-08-21 13:00:48 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-24 05:40:26 +0000
commit8c4b20bc0b9d491bee1efb1a18d87852020f045d (patch)
tree00d6508dc89e61f99d33f1fad00c5a35116aa4cf /xlators/features/marker/src/marker.c
parentf75823f6fcb8aa3116f712ed69fbf4b35d4c3bdd (diff)
marker: fix for coverity issues
Fixes CID: 1325591 1356503 1325540 1351704 Change-Id: I325b1184baa81402eaa009cb36ab95e5de812f6c updates: bz#789278 Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker.c')
-rw-r--r--xlators/features/marker/src/marker.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 522fdfb86d1..57f47ddec97 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -1583,10 +1583,11 @@ marker_get_oldpath_contribution (call_frame_t *lk_frame, void *cookie,
"cannot hold inodelk on %s (gfid:%s) (%s)",
oplocal->loc.path, uuid_utoa (oplocal->loc.inode->gfid),
strerror (op_errno));
+ if (local->lk_frame) {
+ STACK_DESTROY (local->lk_frame->root);
+ local->lk_frame = NULL;
+ }
goto err;
-
- STACK_DESTROY (local->lk_frame->root);
- local->lk_frame = NULL;
}
GET_CONTRI_KEY (this, contri_key, oplocal->loc.parent->gfid, ret);
@@ -3430,7 +3431,7 @@ init (xlator_t *this)
if (data)
ret = gf_string2int32 (data->data, &priv->version);
- if (priv->feature_enabled && priv->version < 0) {
+ if ((ret == 0) && priv->feature_enabled && priv->version < 0) {
gf_log (this->name, GF_LOG_ERROR, "Invalid quota version %d",
priv->version);
goto err;