From 60e443b90b25e2d7e014b0bde928d98e92c25e3b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 6 May 2016 23:38:15 +0900 Subject: [PATCH] h2load: Fix crash on exit on FreeBSD --- src/h2load.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/h2load.cc b/src/h2load.cc index c2424d74..d5046038 100644 --- a/src/h2load.cc +++ b/src/h2load.cc @@ -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) {