]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ks7010: avoid dereferencing packet if it is null
authorColin Ian King <colin.king@canonical.com>
Wed, 7 Sep 2016 16:23:09 +0000 (17:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Sep 2016 09:18:15 +0000 (11:18 +0200)
commitef8f6c1d20d8c6a22274bbd62be98be90e7f188b
tree131bd2259608db5a35aa6de9f2e634f5e803445c
parent5e921df9a2ffad25d0b9cde6d8a296af52d4dee0
staging: ks7010: avoid dereferencing packet if it is null

Updating tx_bytes from packet->len if packet is null will cause
a null pointer dereference, so only update tx_bytes if it packet
is not null.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c