diff --git a/daemon/remote.c b/daemon/remote.c index f79888707..67d50517a 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -428,6 +428,7 @@ int remote_accept_callback(struct comm_point* c, void* arg, int err, n->ssl = SSL_new(rc->ctx); if(!n->ssl) { log_crypto_err("could not SSL_new"); + comm_point_delete(n->c); free(n); goto close_exit; } @@ -436,6 +437,7 @@ int remote_accept_callback(struct comm_point* c, void* arg, int err, if(!SSL_set_fd(n->ssl, newfd)) { log_crypto_err("could not SSL_set_fd"); SSL_free(n->ssl); + comm_point_delete(n->c); free(n); goto close_exit; } diff --git a/doc/Changelog b/doc/Changelog index 95f74125a..498910d2e 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 10 August 2011: Wouter - Fix python site-packages path to /usr/lib64. - updated patch from Tom. + - fix memory and fd leak after out-of-memory condition. 9 August 2011: Wouter - patch from Tom Hendrikx fixes load of python modules.