diff options
author | Bhumika Goyal <bgoyal@redhat.com> | 2018-08-18 23:36:00 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-20 12:17:04 +0000 |
commit | 22a5ecf6906a24883b953c5b4ae37bc30be40dba (patch) | |
tree | e5a8d4cafd015de048cbb980587255e4f5362f42 /xlators/features/quota | |
parent | e37ee6d509aa98587d55f9ea73bc831c10761eaa (diff) |
quota: coverity fixes
Fixes CID: 1325638 1288766 1124357
Change-Id: I425f857d0d549da2dfaa6a6e6b8440cb14c21121
updates: bz#789278
Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
Diffstat (limited to 'xlators/features/quota')
-rw-r--r-- | xlators/features/quota/src/quota.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 54414025a95..f0c225282a5 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -472,7 +472,6 @@ check_ancestory_2 (xlator_t *this, quota_local_t *local, inode_t *inode) name = (char *) local->loc.name; if (local->loc.parent) { gf_uuid_copy (pgfid, local->loc.parent->gfid); - parent = local->loc.parent; } cur_inode = inode_ref (inode); @@ -1438,9 +1437,6 @@ out: new_frame->local = NULL; STACK_DESTROY (new_frame->root); } - - if (new_local) - quota_local_cleanup (new_local); } return parent; @@ -2936,6 +2932,7 @@ quota_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, quota_local_t *local = NULL; quota_inode_ctx_t *ctx = NULL; quota_dentry_t *dentry = NULL; + int32_t ret = -1; if (op_ret < 0) { goto out; @@ -2943,8 +2940,8 @@ quota_symlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local = frame->local; - quota_inode_ctx_get (local->loc.inode, this, &ctx, 1); - if (ctx == NULL) { + ret = quota_inode_ctx_get (local->loc.inode, this, &ctx, 1); + if ((ret == -1) || (ctx == NULL)) { gf_msg_debug (this->name, 0, "quota context is NULL on inode" " (%s). If quota is not enabled recently and " "crawler has finished crawling, its an error", |