X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fcommon%2Fdns_resolve.cc;h=a2b296a676f6d86cce2868501091153209bf5f2f;hb=b32b81446b3b05102be0267e79203f59329c1d97;hp=13f06548e84d040a9ab17da1beb06dfb24430d6d;hpb=215dd7151453fae88e6f968c975b6ce309d42dcf;p=ceph.git diff --git a/ceph/src/common/dns_resolve.cc b/ceph/src/common/dns_resolve.cc index 13f06548e..a2b296a67 100644 --- a/ceph/src/common/dns_resolve.cc +++ b/ceph/src/common/dns_resolve.cc @@ -197,6 +197,9 @@ int DNSResolver::resolve_ip_addr(CephContext *cct, const string& hostname, if (r < 0) { return r; } + auto put_state = make_scope_guard([res, this] { + this->put_state(res); + }); return this->resolve_ip_addr(cct, &res, hostname, addr); #else return this->resolve_ip_addr(cct, NULL, hostname, addr);