set NULL after free to avoid duplicate free.
Tested by: Ganbold <ganbold_at_micom.mng.net>
This commit is contained in:
parent
5b35d05538
commit
c4f82f895d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190367
@ -3250,8 +3250,10 @@ ndis_stop(sc)
|
||||
|
||||
NDIS_LOCK(sc);
|
||||
for (i = 0; i < NDIS_EVENTS; i++) {
|
||||
if (sc->ndis_evt[i].ne_sts && sc->ndis_evt[i].ne_buf != NULL)
|
||||
if (sc->ndis_evt[i].ne_sts && sc->ndis_evt[i].ne_buf != NULL) {
|
||||
free(sc->ndis_evt[i].ne_buf, M_TEMP);
|
||||
sc->ndis_evt[i].ne_buf = NULL;
|
||||
}
|
||||
sc->ndis_evt[i].ne_sts = 0;
|
||||
sc->ndis_evt[i].ne_len = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user