diff options
-rw-r--r-- | accel-pppd/radius/acct.c | 10 | ||||
-rw-r--r-- | accel-pppd/radius/auth.c | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/accel-pppd/radius/acct.c b/accel-pppd/radius/acct.c index 43e5549a..0a961a79 100644 --- a/accel-pppd/radius/acct.c +++ b/accel-pppd/radius/acct.c @@ -264,12 +264,14 @@ int rad_acct_start(struct radius_pd_t *rpd) if (conf_acct_delay_time) { time(&ts); rad_packet_change_int(rpd->acct_req->pack, NULL, "Acct-Delay-Time", ts - rpd->acct_timestamp); - if (req_set_RA(rpd->acct_req, rpd->acct_req->serv->secret)) + if (req_set_RA(rpd->acct_req, rpd->acct_req->serv->secret)) { + rad_server_req_exit(rpd->acct_req); goto out_err; + } } if (rad_req_send(rpd->acct_req, conf_verbose)) - goto out_err; + goto out; __sync_add_and_fetch(&rpd->acct_req->serv->stat_acct_sent, 1); @@ -300,6 +302,7 @@ int rad_acct_start(struct radius_pd_t *rpd) break; } +out: rad_server_req_exit(rpd->acct_req); if (rpd->acct_req->reply) @@ -414,7 +417,7 @@ void rad_acct_stop(struct radius_pd_t *rpd) break; } if (rad_req_send(rpd->acct_req, conf_verbose)) - break; + goto out; __sync_add_and_fetch(&rpd->acct_req->serv->stat_acct_sent, 1); rad_req_wait(rpd->acct_req, conf_timeout); if (!rpd->acct_req->reply) { @@ -439,6 +442,7 @@ void rad_acct_stop(struct radius_pd_t *rpd) break; } +out: rad_server_req_exit(rpd->acct_req); if (rpd->acct_req->reply) diff --git a/accel-pppd/radius/auth.c b/accel-pppd/radius/auth.c index 3e5d281d..14cb9b2c 100644 --- a/accel-pppd/radius/auth.c +++ b/accel-pppd/radius/auth.c @@ -193,7 +193,7 @@ static int rad_auth_send(struct rad_req_t *req) stat_accm_add(req->serv->stat_auth_lost_5m, 1); } } - +out: rad_server_req_exit(req); if (!req->reply) { @@ -212,7 +212,6 @@ static int rad_auth_send(struct rad_req_t *req) } } -out: return PWDB_DENIED; } |