From 9265a505207b8eaa59202628ac93e4a45d155d62 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 14 Oct 2013 13:47:57 +0400 Subject: ippool: fixed sigsegv due to missing check for NULL (intoduced by 67ac2ba78573644d6649921bafc41ba098061e0a) --- accel-pppd/extra/ippool.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c index 442024c6..2790183d 100644 --- a/accel-pppd/extra/ippool.c +++ b/accel-pppd/extra/ippool.c @@ -285,10 +285,12 @@ static struct ipv4db_item_t *get_ip(struct ap_session *ses) it = NULL; spin_unlock(&p->lock); - if (ses->ctrl->ppp) - it->it.addr = conf_gw_ip_address; - else - it->it.addr = 0; + if (it) { + if (ses->ctrl->ppp) + it->it.addr = conf_gw_ip_address; + else + it->it.addr = 0; + } return it ? &it->it : NULL; } -- cgit v1.2.3