rpc: add missing free of rpc->dnscache

Change-Id: I3fa97b99bf23459cf548205d75d2cc7936b2310e
fixes: bz#1607689
Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
This commit is contained in:
Zhang Huan 2018-07-23 16:07:59 +08:00 committed by Amar Tumballi
parent 75300258c4
commit e7c87f757c

View File

@ -458,6 +458,7 @@ fail:
int32_t
rpc_transport_destroy (rpc_transport_t *this)
{
struct dnscache6 *cache = NULL;
int32_t ret = -1;
GF_VALIDATE_OR_GOTO("rpc_transport", this, fail);
@ -480,6 +481,13 @@ rpc_transport_destroy (rpc_transport_t *this)
GF_FREE(this->ssl_name);
}
if (this->dnscache) {
cache = this->dnscache;
if (cache->first)
freeaddrinfo (cache->first);
GF_FREE (this->dnscache);
}
GF_FREE (this);
fail:
return ret;