Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ea05ce7 authored by David S. Miller's avatar David S. Miller
Browse files

bna: Check for NULL before deref in bnad_cb_tx_cleanup

parent 9ca7f876
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -867,11 +867,12 @@ bnad_cb_tx_resume(struct bnad *bnad, struct bna_tcb *tcb)
static void
bnad_cb_tx_cleanup(struct bnad *bnad, struct bna_tcb *tcb)
{
	struct bnad_unmap_q *unmap_q = tcb->unmap_q;
	struct bnad_unmap_q *unmap_q;

	if (!tcb || (!tcb->unmap_q))
		return;

	unmap_q = tcb->unmap_q;
	if (!unmap_q->unmap_array)
		return;