From: Thilo Bangert Date: Wed, 5 Oct 2016 17:04:58 +0000 (+0200) Subject: Make sure all listen_fds have their own copy of the addr string. (#746) X-Git-Tag: v1.7.0~29 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d830f5f8977eea40daafad8c7b46494e009fa32d;p=thirdparty%2Frrdtool-1.x.git Make sure all listen_fds have their own copy of the addr string. (#746) Fixes double free on shutdown #745. --- diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index c325d8c7..58715f13 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -3728,6 +3728,7 @@ static int open_listen_socket_network(const listen_socket_t *sock) /* {{{ */ listen_fds[listen_fds_num].fd = fd; listen_fds[listen_fds_num].family = ai_ptr->ai_family; + listen_fds[listen_fds_num].addr = strdup(sock->addr); listen_fds_num++; } /* for (ai_ptr) */