2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +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

@@ -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);
}