From: Andreas Gustafsson Date: Tue, 22 Jan 2002 23:17:44 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.2.0^2~55 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=d7224e6672cd972c2c5447d3fbcf5cfdb720799f;p=thirdparty%2Fbind9.git pullup: reference after free in error path. --- diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 1885c132b88..19cf62a5317 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.207.2.5 2002/01/22 05:00:30 marka Exp $ */ +/* $Id: socket.c,v 1.207.2.6 2002/01/22 23:17:44 gson Exp $ */ #include @@ -2252,14 +2252,14 @@ isc_socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp) { */ if (isc_thread_create(watcher, manager, &manager->watcher) != ISC_R_SUCCESS) { + close(manager->pipe_fds[0]); + close(manager->pipe_fds[1]); DESTROYLOCK(&manager->lock); isc_mem_put(mctx, manager, sizeof *manager); UNEXPECTED_ERROR(__FILE__, __LINE__, "isc_thread_create() %s", isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL, ISC_MSG_FAILED, "failed")); - close(manager->pipe_fds[0]); - close(manager->pipe_fds[1]); return (ISC_R_UNEXPECTED); } #endif /* ISC_PLATFORM_USETHREADS */