[core] fix crash at shutdown w/ certain config

If server.systemd-socket-activation = "enable" and one or more of the
sockets is not listed in lighttpd.conf, then when the server is shutting
down, a buffer from the config file is free()d twice.
master
Glenn Strauss 2 years ago
parent 8f3395976d
commit 048af4c506

@ -686,6 +686,8 @@ int network_init(server *srv, int stdin_fd) {
force_assert(NULL != srv_socket);
memcpy(srv_socket, srv->srv_sockets_inherited.ptr[i],
sizeof(server_socket));
srv_socket->srv_token =
buffer_init_buffer(srv_socket->srv_token);
network_srv_sockets_append(srv, srv_socket);
}
}

Loading…
Cancel
Save