diff options
author | Prashanth Pai <ppai@redhat.com> | 2017-11-03 11:53:12 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-11-06 03:56:48 +0000 |
commit | f461d75b226a5bc6c088280e43a96f9b54f33af5 (patch) | |
tree | 9c743476a35a85777f79c183c65363a1d184697b /xlators/mgmt/glusterd/src/glusterd-locks.c | |
parent | 0f10b1a5caa78d723b3e8b879d1de162730913ce (diff) |
glusterd: Fix few coverity errors
Fixes issues 810, 248, 491, 499, 85, 786, 811, 43, and 44
from the report at [1].
[1]: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/
BUG: 789278
Change-Id: I27ebae2ffb2256b8eef0757d768cc46e5a942e9f
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-locks.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-locks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-locks.c b/xlators/mgmt/glusterd/src/glusterd-locks.c index c7951b3cf24..45667be1894 100644 --- a/xlators/mgmt/glusterd/src/glusterd-locks.c +++ b/xlators/mgmt/glusterd/src/glusterd-locks.c @@ -699,6 +699,7 @@ glusterd_mgmt_v3_lock (const char *name, uuid_t uuid, uint32_t *op_errno, ret = 0; out: + GF_FREE (key_dup); gf_msg_trace (this->name, 0, "Returning %d", ret); return ret; } @@ -753,11 +754,10 @@ gd_mgmt_v3_unlock_timer_cbk (void *data) gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_SET_FAILED, "Unable to get lock owner in mgmt_v3 lock"); - goto out; } out: - if (mgmt_lock_timer->timer) { + if (mgmt_lock_timer && mgmt_lock_timer->timer) { mgmt_lock_timer_xl = mgmt_lock_timer->xl; GF_VALIDATE_OR_GOTO (this->name, mgmt_lock_timer_xl, ret_function); |