Browse Source

network_server_init: fix double free and memleak on error (fixes #2440, thx kyprizel)

this is not really critical - lighty will terminate anyway after hitting
this, and this is before connections are accepted.

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2855 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.32
Stefan Bühler 9 years ago
parent
commit
c3a9948c75
  1. 1
      NEWS
  2. 7
      src/network.c

1
NEWS

@ -10,6 +10,7 @@ NEWS
* configure.ac: remove old stuff, add some new to fix warnings in automake 1.12 (fixes #2419, thx blino)
* add PATCH method (fixes #2424)
* fix :port handling in $HTTP["host"] checks (fixes #2135. thx liming)
* network_server_init: fix double free and memleak on error (fixes #2440, thx kyprizel)
- 1.4.31 - 2012-05-31
* [ssl] fix segfault in counting renegotiations for openssl versions without TLSEXT/SNI (thx carpii for reporting)

7
src/network.c

@ -397,11 +397,6 @@ static int network_server_init(server *srv, buffer *host_token, specific_config
}
#else
buffer_free(srv_socket->srv_token);
free(srv_socket);
buffer_free(b);
log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:",
"ssl requested but openssl support is not compiled in");
@ -458,6 +453,8 @@ error_free_socket:
buffer_free(srv_socket->srv_token);
free(srv_socket);
buffer_free(b);
return -1;
}

Loading…
Cancel
Save