diff options
| author | Sunny Kumar <sunkumar@redhat.com> | 2018-11-03 23:09:40 +0530 | 
|---|---|---|
| committer | Atin Mukherjee <amukherj@redhat.com> | 2018-11-05 14:56:07 +0000 | 
| commit | 49f1b76f471f0845a2c7edf69f5629226f73ad27 (patch) | |
| tree | f058a8be9d7e319507345e46d782f8bd7691c539 | |
| parent | bd1a8fc74ac9322384daab94bf5736cae15ecbfe (diff) | |
glusterd : fix high sev coverity issue
This patch fixes CID : 1174824 : RESOURCE_LEAK
updates: bz#789278
Change-Id: I2a4f8b508995de112fa16e1094e44ecd4b625312
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 9981a1ce1a3..f0ee571c993 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -4553,8 +4553,10 @@ glusterd_store_retrieve_peers(xlator_t *this)              goto next;          ret = gf_store_iter_get_next(iter, &key, &value, &op_errno); -        if (ret) +        if (ret) { +            (void)gf_store_iter_destroy(iter);              goto next; +        }          /* Create an empty peerinfo object before reading in the           * details @@ -4649,6 +4651,7 @@ glusterd_store_retrieve_peers(xlator_t *this)      peerinfo = NULL;  out: +      if (dir)          sys_closedir(dir);      gf_msg_debug(this->name, 0, "Returning with %d", ret);  | 
