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{} {}
Config::~Config() {
if (base_uri_unix) {
delete addrs;
} else {
freeaddrinfo(addrs);
if (addrs) {
if (base_uri_unix) {
delete addrs;
} else {
freeaddrinfo(addrs);
}
}
if (data_fd != -1) {