]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/address_help.cc: fix the leak in entity_addr_from_url() 6987/head
authorqiankunzheng <zheng.qiankun@h3c.com>
Wed, 23 Dec 2015 22:29:26 +0000 (17:29 -0500)
committerqiankunzheng <zheng.qiankun@h3c.com>
Wed, 23 Dec 2015 22:30:34 +0000 (17:30 -0500)
Fixes: #14132
Signed-off-by: Qiankun Zheng <zheng.qiankun@h3c.com>
src/common/address_helper.cc

index 1bde1accd779657c174f2fb3001dc585e545a7c2..35cb0f2b5d46ca33a3a5ecd5c16a9bd70b958cf8 100644 (file)
@@ -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;
                }
        }