diff options
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 946e65b879c..40a40faee10 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -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; |