From f5a079f739c57d8be7c59149fd45475c402a45fc Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 8 May 2013 18:42:39 +0200 Subject: lapd: Set the tx_hist to NULL after freeing it Make detecting use after free of the tx_hist easy and set the variable to NULL after talloc_free has been freed. --- src/gsm/lapd_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c index f351308d..9dbdfcf9 100644 --- a/src/gsm/lapd_core.c +++ b/src/gsm/lapd_core.c @@ -327,6 +327,7 @@ void lapd_dl_exit(struct lapd_datalink *dl) lapd_dl_reset(dl); /* free history buffer list */ talloc_free(dl->tx_hist); + dl->tx_hist = NULL; } /*! \brief Set the \ref lapdm_mode of a LAPDm entity */ -- cgit v1.2.3