2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Memory leak when ISC_MEM_TRACKLINES is defined.

This commit is contained in:
Mark Andrews
2000-11-25 06:40:54 +00:00
parent 3e8875db60
commit 07892e4443

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mem.c,v 1.65 2000/10/20 02:21:56 marka Exp $ */
/* $Id: mem.c,v 1.66 2000/11/25 06:40:54 marka Exp $ */
#include <config.h>
@@ -712,6 +712,16 @@ destroy(isc_mem_t *ctx) {
#ifdef ISC_MEM_TRACKLINES
if (ctx->checkfree)
INSIST(ISC_LIST_EMPTY(ctx->debuglist));
else {
debuglink_t *dl;
for (dl = ISC_LIST_HEAD(ctx->debuglist);
dl != NULL;
dl = ISC_LIST_HEAD(ctx->debuglist)) {
ISC_LIST_UNLINK(ctx->debuglist, dl, link);
free(dl);
}
}
#endif
INSIST(ctx->references == 0);