diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-10-14 13:47:57 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-10-14 13:48:33 +0400 |
commit | 9265a505207b8eaa59202628ac93e4a45d155d62 (patch) | |
tree | 686d389d93e9b071a938689ac71c5aac7bc34cf5 /accel-pppd/extra | |
parent | 53c98ffb495b2cbb6da2f9d06b92cdece986c395 (diff) | |
download | accel-ppp-9265a505207b8eaa59202628ac93e4a45d155d62.tar.gz accel-ppp-9265a505207b8eaa59202628ac93e4a45d155d62.zip |
ippool: fixed sigsegv due to missing check for NULL (intoduced by 67ac2ba78573644d6649921bafc41ba098061e0a)
Diffstat (limited to 'accel-pppd/extra')
-rw-r--r-- | accel-pppd/extra/ippool.c | 10 |
1 files 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; } |