mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
cxgbe(4): Avoid a NULL dereference that would occur during module unload
if there were problems earlier during attach. MFC after: 3 days Sponsored by: Chelsio Communications
This commit is contained in:
parent
0b9b3897a8
commit
cc2050c5eb
1 changed files with 4 additions and 2 deletions
|
|
@ -382,8 +382,10 @@ t4_free_tx_sched(struct adapter *sc)
|
|||
|
||||
taskqueue_drain(taskqueue_thread, &sc->tc_task);
|
||||
|
||||
for_each_port(sc, i)
|
||||
free(sc->port[i]->sched_params, M_CXGBE);
|
||||
for_each_port(sc, i) {
|
||||
if (sc->port[i] != NULL)
|
||||
free(sc->port[i]->sched_params, M_CXGBE);
|
||||
}
|
||||
|
||||
if (mtx_initialized(&sc->tc_lock))
|
||||
mtx_destroy(&sc->tc_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue