From 86c4c11ca279c1f5e9dc776217d4ab5b7e0cb51e Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Wed, 10 Aug 2011 14:03:06 +0000 Subject: [PATCH] - fix memory and fd leak after out-of-memory condition. git-svn-id: file:///svn/unbound/trunk@2473 be551aaa-1e26-0410-a405-d3ace91eadb9 --- daemon/remote.c | 2 ++ doc/Changelog | 1 + 2 files changed, 3 insertions(+) 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. -- 2.47.3