diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-10-10 22:41:13 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-10-10 22:41:13 +0400 |
commit | dc7f00931df32a905f7fa5aa72a028cf6e807c3a (patch) | |
tree | 89ff8658c4b794debd62cc2105b2fd7dfbd84b22 /accel-pppd/extra/ippool.c | |
parent | 272dbf39f83240451d6a0c122ccdbe28eb892ad7 (diff) | |
parent | 8c608ea9a5b6b73520c11e3974bb8cad3b7da914 (diff) | |
download | accel-ppp-xebd-dc7f00931df32a905f7fa5aa72a028cf6e807c3a.tar.gz accel-ppp-xebd-dc7f00931df32a905f7fa5aa72a028cf6e807c3a.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/code
Diffstat (limited to 'accel-pppd/extra/ippool.c')
-rw-r--r-- | accel-pppd/extra/ippool.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c index 2f4b2e4..8dbf027 100644 --- a/accel-pppd/extra/ippool.c +++ b/accel-pppd/extra/ippool.c @@ -388,13 +388,18 @@ static struct backup_module backup_mod = { #ifdef RADIUS static int parse_attr(struct ap_session *ses, struct rad_attr_t *attr) { + if (ses->ipv4_pool_name) + _free(ses->ipv4_pool_name); + if (attr->len > sizeof("ip:addr-pool=") && memcmp(attr->val.string, "ip:addr-pool=", sizeof("ip:addr-pool=") - 1) == 0) ses->ipv4_pool_name = _strdup(attr->val.string + sizeof("ip:addr-pool=") - 1); else if (!attr->vendor) ses->ipv4_pool_name = _strdup(attr->val.string); - else + else { + ses->ipv4_pool_name = NULL; return -1; - + } + return 0; } |