mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-14 06:32:14 -04:00
1525. [bug] dns_cache_create() could trigger a REQUIRE
failure in isc_mem_put() during error cleanup.
This commit is contained in:
parent
09e4b1e086
commit
b30b2e3358
2 changed files with 9 additions and 2 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,6 +1,9 @@
|
|||
|
||||
--- 9.2.3 released ---
|
||||
|
||||
1525. [bug] dns_cache_create() could trigger a REQUIRE
|
||||
failure in isc_mem_put() during error cleanup.
|
||||
|
||||
1524. [port] AIX needs to be able to resolve all symbols when
|
||||
creating shared libraries (--with-libtool).
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: cache.c,v 1.45.2.4 2002/08/05 06:57:11 marka Exp $ */
|
||||
/* $Id: cache.c,v 1.45.2.5 2003/10/16 06:07:12 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -245,7 +245,9 @@ dns_cache_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
|||
for (i = 0; i < cache->db_argc; i++)
|
||||
if (cache->db_argv[i] != NULL)
|
||||
isc_mem_free(mctx, cache->db_argv[i]);
|
||||
isc_mem_put(mctx, cache->db_argv, cache->db_argc * sizeof(char *));
|
||||
if (cache->db_argv != NULL)
|
||||
isc_mem_put(mctx, cache->db_argv,
|
||||
cache->db_argc * sizeof(char *));
|
||||
cleanup_dbtype:
|
||||
isc_mem_free(mctx, cache->db_type);
|
||||
cleanup_filelock:
|
||||
|
|
@ -549,6 +551,8 @@ cache_cleaner_init(dns_cache_t *cache, isc_taskmgr_t *taskmgr,
|
|||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
if (cleaner->overmem_event != NULL)
|
||||
isc_event_free(&cleaner->overmem_event);
|
||||
if (cleaner->resched_event != NULL)
|
||||
isc_event_free(&cleaner->resched_event);
|
||||
if (cleaner->cleaning_timer != NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue