From 386fef57fa9849c733d68ae3b4c7fc4bdb28f11e Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 1 Feb 2000 17:27:23 +0000 Subject: [PATCH] don't write to freed memory --- lib/isc/lex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/isc/lex.c b/lib/isc/lex.c index ad14dc7e70..83833b9ed7 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -133,8 +133,8 @@ isc_lex_destroy(isc_lex_t **lexp) { isc_lex_close(lex); if (lex->data != NULL) isc_mem_put(lex->mctx, lex->data, lex->max_token + 1); - isc_mem_put(lex->mctx, lex, sizeof *lex); lex->magic = 0; + isc_mem_put(lex->mctx, lex, sizeof *lex); *lexp = NULL; }