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:
parent
75300258c4
commit
e7c87f757c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user