h2load: Fix crash on exit on FreeBSD

This commit is contained in:
Tatsuhiro Tsujikawa 2016-05-06 23:38:15 +09:00
parent d39335829d
commit 60e443b90b
1 changed files with 6 additions and 4 deletions

View File

@ -101,10 +101,12 @@ Config::Config()
unix_addr{} {} unix_addr{} {}
Config::~Config() { Config::~Config() {
if (base_uri_unix) { if (addrs) {
delete addrs; if (base_uri_unix) {
} else { delete addrs;
freeaddrinfo(addrs); } else {
freeaddrinfo(addrs);
}
} }
if (data_fd != -1) { if (data_fd != -1) {