2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

don't write to freed memory

This commit is contained in:
Andreas Gustafsson 2000-02-01 17:27:23 +00:00
parent bb744e24d6
commit 386fef57fa

View File

@ -133,8 +133,8 @@ isc_lex_destroy(isc_lex_t **lexp) {
isc_lex_close(lex); isc_lex_close(lex);
if (lex->data != NULL) if (lex->data != NULL)
isc_mem_put(lex->mctx, lex->data, lex->max_token + 1); isc_mem_put(lex->mctx, lex->data, lex->max_token + 1);
isc_mem_put(lex->mctx, lex, sizeof *lex);
lex->magic = 0; lex->magic = 0;
isc_mem_put(lex->mctx, lex, sizeof *lex);
*lexp = NULL; *lexp = NULL;
} }