isdn/gigaset: fix NULL pointer dereference

In do_action, a NULL pointer might be passed to function start_dial
which will dereference it.
Fix by adding a check for NULL before the call.

Spotted with Coverity.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tilman Schmidt 2014-10-11 13:46:29 +02:00 committed by David S. Miller
parent 097933ddcd
commit 846ac30135

View file

@ -1380,6 +1380,11 @@ static void do_action(int action, struct cardstate *cs,
/* events from the LL */ /* events from the LL */
case ACT_DIAL: case ACT_DIAL:
if (!ev->ptr) {
*p_genresp = 1;
*p_resp_code = RSP_ERROR;
break;
}
start_dial(at_state, ev->ptr, ev->parameter); start_dial(at_state, ev->ptr, ev->parameter);
break; break;
case ACT_ACCEPT: case ACT_ACCEPT: