]> git.baikalelectronics.ru Git - kernel.git/commit
mISDN: prevent possible NULL pointer dereference
authorAnton Protopopov <a.s.protopopov@gmail.com>
Wed, 17 Feb 2016 16:19:56 +0000 (11:19 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Feb 2016 19:59:35 +0000 (14:59 -0500)
commitf40126370c8c2c1d5be7c0ce4338d55770020a44
treec0f9077bbd5b4eb462d8865d526459335b0c61ef
parent1bf4a6dbcda08fb627dfa9a9b87d846a418f2921
mISDN: prevent possible NULL pointer dereference

A return value of the bchannel_get_rxbuf() function is compared with the
positive ENOMEM value instead of the negative -ENOMEM value to detect a
memory allocation problem. Thus, after a possible memory allocation
failure the bc->bch.rx_skb will be NULL which will lead to a NULL
pointer dereference.

Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hardware/mISDN/netjet.c