2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

1562. [bug] isc_socket_create() and isc_socket_accept() could

leak memory under error conditions. [RT #10230]
This commit is contained in:
Mark Andrews 2004-01-26 23:33:32 +00:00
parent 2f35edba9c
commit 96c973a6a9
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,6 @@
1562. [bug] isc_socket_create() and isc_socket_accept() could
leak memory under error conditions. [RT #10230]
1561. [bug] It was possible to release the same name twice if
named ran out of memory. [RT #10197]

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.232 2003/07/25 00:01:13 marka Exp $ */
/* $Id: socket.c,v 1.233 2004/01/26 23:33:32 marka Exp $ */
#include <config.h>
@ -1246,7 +1246,8 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
return (ISC_R_SUCCESS);
error: /* socket allocated */
error:
isc_mem_put(manager->mctx, sock, sizeof(*sock));
return (ret);
}

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.27 2004/01/08 08:23:11 marka Exp $ */
/* $Id: socket.c,v 1.28 2004/01/26 23:33:32 marka Exp $ */
/* This code has been rewritten to take advantage of Windows Sockets
* I/O Completion Ports and Events. I/O Completion Ports is ONLY
@ -1754,10 +1754,12 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
return (ISC_R_SUCCESS);
error: /* socket allocated */
error:
isc_mem_put(manager->mctx, sock, sizeof(*sock));
return (ret);
}
/*
* This event requires that the various lists be empty, that the reference
* count be 1, and that the magic number is valid. The other socket bits,