]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- fix memory and fd leak after out-of-memory condition.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 10 Aug 2011 14:03:06 +0000 (14:03 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 10 Aug 2011 14:03:06 +0000 (14:03 +0000)
git-svn-id: file:///svn/unbound/trunk@2473 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/remote.c
doc/Changelog

index f79888707933c2d29b2af1247edd83ff47fc3b14..67d50517a4cee05be164b29ea604031de471addb 100644 (file)
@@ -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;
        }
index 95f74125ab5031c3ee2a751f9735dfe78f0cd8cf..498910d2e00c0d6995f66d7017fb9949845a2e91 100644 (file)
@@ -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.