From: qiankunzheng Date: Wed, 23 Dec 2015 22:29:26 +0000 (-0500) Subject: common/address_help.cc: fix the leak in entity_addr_from_url() X-Git-Tag: v10.0.3~165^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6987%2Fhead;p=ceph.git common/address_help.cc: fix the leak in entity_addr_from_url() Fixes: #14132 Signed-off-by: Qiankun Zheng --- diff --git a/src/common/address_helper.cc b/src/common/address_helper.cc index 1bde1accd779..35cb0f2b5d46 100644 --- a/src/common/address_helper.cc +++ b/src/common/address_helper.cc @@ -59,6 +59,7 @@ int entity_addr_from_url(entity_addr_t *addr /* out */, const char *url) break; }; addr->set_port(std::atoi(port.c_str())); + freeaddrinfo(res); return 0; } }