]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vt6656: fix potential NULL pointer dereference
authorQuentin Deslandes <quentin.deslandes@itdev.co.uk>
Mon, 20 May 2019 16:39:01 +0000 (16:39 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 06:25:03 +0000 (08:25 +0200)
commit2de4c876e7925d80953097f16418dcb0a901fccb
tree6b88341e24e134bc126bcf4f2989f57a0d14b874
parent58d0f05c0f6bec80416b2012d7065e48ae33566d
staging: vt6656: fix potential NULL pointer dereference

vnt_free_tx_bufs() relies on priv->tx_context elements to be NULL if
they are not initialized (as vnt_free_rx_bufs() does). Add a check to
these elements in order to avoid NULL pointer dereference.

Signed-off-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/main_usb.c