summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-08-27 18:19:58 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-31 01:25:32 +0000
commit6a2f83caad7ff882e3a8da5fdec4be8ceccbfdc2 (patch)
tree01d818a88f1a3c8a11667c5e21e6131d0103ccc1 /xlators/protocol/server/src/server.c
parent33f53e88c31394ef5b0b927cd11f8b349647b435 (diff)
coverity: multiple fixes
CID: 1390477, 1124827 updates: bz#789278 Change-Id: I41060d131aec6e58e7267ac8531b29a70f8c4359 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server.c')
-rw-r--r--xlators/protocol/server/src/server.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 73d239f0..4cf4b4a 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -970,7 +970,6 @@ server_init (xlator_t *this)
{
int32_t ret = -1;
server_conf_t *conf = NULL;
- rpcsvc_listener_t *listener = NULL;
char *transport_type = NULL;
char *statedump_path = NULL;
int total_transport = 0;
@@ -1229,8 +1228,12 @@ out:
this->fini (this);
}
- if (listener != NULL) {
- rpcsvc_listener_destroy (listener);
+ if (conf && conf->rpc) {
+ rpcsvc_listener_t *listener, *next;
+ list_for_each_entry_safe (listener, next,
+ &conf->rpc->listeners, list) {
+ rpcsvc_listener_destroy (listener);
+ }
}
}