mirror of https://gerrit.osmocom.org/libosmocore
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.
This commit is contained in:
parent
d0ce550251
commit
f5a079f739
|
@ -327,6 +327,7 @@ void lapd_dl_exit(struct lapd_datalink *dl)
|
||||||
lapd_dl_reset(dl);
|
lapd_dl_reset(dl);
|
||||||
/* free history buffer list */
|
/* free history buffer list */
|
||||||
talloc_free(dl->tx_hist);
|
talloc_free(dl->tx_hist);
|
||||||
|
dl->tx_hist = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Set the \ref lapdm_mode of a LAPDm entity */
|
/*! \brief Set the \ref lapdm_mode of a LAPDm entity */
|
||||||
|
|
Loading…
Reference in New Issue