bna: Check for NULL before deref in bnad_cb_tx_cleanup
Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -867,11 +867,12 @@ bnad_cb_tx_resume(struct bnad *bnad, struct bna_tcb *tcb)
|
|||||||
static void
|
static void
|
||||||
bnad_cb_tx_cleanup(struct bnad *bnad, struct bna_tcb *tcb)
|
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))
|
if (!tcb || (!tcb->unmap_q))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
unmap_q = tcb->unmap_q;
|
||||||
if (!unmap_q->unmap_array)
|
if (!unmap_q->unmap_array)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user