mISDN: Fix null pointer dereference at mISDN_FsmNew
authorAnton Vasilyev <vasilyev@ispras.ru>
Fri, 11 Aug 2017 12:57:22 +0000 (15:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Aug 2017 21:56:23 +0000 (14:56 -0700)
commit54a6a043fb8580d5a741774669ef6049f402f228
tree9632f50edc83f47ea18ef6011af1cafec141dc8b
parentbb3afda4fc4ea690ff92a36eef4c0afe4d19da04
mISDN: Fix null pointer dereference at mISDN_FsmNew

If mISDN_FsmNew() fails to allocate memory for jumpmatrix
then null pointer dereference will occur on any write to
jumpmatrix.

The patch adds check on successful allocation and
corresponding error handling.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/mISDN/fsm.c
drivers/isdn/mISDN/fsm.h
drivers/isdn/mISDN/layer1.c
drivers/isdn/mISDN/layer2.c
drivers/isdn/mISDN/tei.c