diff options
author | Zhang Huan <zhanghuan@open-fs.com> | 2018-07-23 16:07:59 +0800 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-07-28 07:21:12 +0000 |
commit | e7c87f757c9dbf2492c22f8b5a4c9700e126af31 (patch) | |
tree | 40f2ae30f6857898664eee899a86dda25b77124e /rpc/rpc-lib | |
parent | 75300258c42aeb29350ac55beb3360ca208454b5 (diff) |
rpc: add missing free of rpc->dnscache
Change-Id: I3fa97b99bf23459cf548205d75d2cc7936b2310e
fixes: bz#1607689
Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
Diffstat (limited to 'rpc/rpc-lib')
-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; |