summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/serv.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/radius/serv.c')
-rw-r--r--accel-pppd/radius/serv.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/accel-pppd/radius/serv.c b/accel-pppd/radius/serv.c
index 65af74d..6d1eb4c 100644
--- a/accel-pppd/radius/serv.c
+++ b/accel-pppd/radius/serv.c
@@ -197,6 +197,8 @@ int rad_server_req_enter(struct rad_req_t *req)
pthread_mutex_lock(&req->serv->lock);
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+
if (ts.tv_sec < req->serv->fail_time) {
pthread_mutex_unlock(&req->serv->lock);
return -1;
@@ -616,15 +618,19 @@ static int parse_server_old(const char *opt, in_addr_t *addr, int *port, char **
*p1 = 0;
if (p2)
*p2 = 0;
- else
+ else {
+ _free(str);
return -1;
+ }
*addr = inet_addr(str);
if (p1) {
*port = atoi(p1 + 1);
- if (*port <=0 )
+ if (*port <=0) {
+ _free(str);
return -1;
+ }
}
*secret = _strdup(p2 + 1);