From f28cc4b2c0a00029b7aee3cc36d478df279f9c9b Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 12 May 2014 14:08:52 +0400 Subject: [PATCH] radius: release auth request immediatly after get responce There is no need to keep auth request structure in memory during whole session life time. It wastes memory and file descriptors --- accel-pppd/radius/auth.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/accel-pppd/radius/auth.c b/accel-pppd/radius/auth.c index 0efe1c6..675f948 100644 --- a/accel-pppd/radius/auth.c +++ b/accel-pppd/radius/auth.c @@ -324,7 +324,6 @@ int rad_auth_chap_md5(struct radius_pd_t *rpd, const char *username, va_list arg rpd->auth_req->pack->id++; } - return r; out: rad_req_free(rpd->auth_req); rpd->auth_req = NULL; @@ -448,7 +447,6 @@ int rad_auth_mschap_v1(struct radius_pd_t *rpd, const char *username, va_list ar *mschap_error = ra->val.string; } - return r; out: rad_req_free(rpd->auth_req); rpd->auth_req = NULL; @@ -540,9 +538,6 @@ int rad_auth_mschap_v2(struct radius_pd_t *rpd, const char *username, va_list ar *reply_msg = ra->val.string; } - - - return r; out: rad_req_free(rpd->auth_req); rpd->auth_req = NULL; -- GitLab