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:
David S. Miller 2010-09-12 12:06:00 -07:00
parent 9ca7f87622
commit 0ea05ce7fd
1 changed files with 2 additions and 1 deletions

View File

@ -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;