提交 f28cc4b2 编写于 作者: D Dmitry Kozlov

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
上级 0c0bdd36
...@@ -324,7 +324,6 @@ int rad_auth_chap_md5(struct radius_pd_t *rpd, const char *username, va_list arg ...@@ -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++; rpd->auth_req->pack->id++;
} }
return r;
out: out:
rad_req_free(rpd->auth_req); rad_req_free(rpd->auth_req);
rpd->auth_req = NULL; rpd->auth_req = NULL;
...@@ -448,7 +447,6 @@ int rad_auth_mschap_v1(struct radius_pd_t *rpd, const char *username, va_list ar ...@@ -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; *mschap_error = ra->val.string;
} }
return r;
out: out:
rad_req_free(rpd->auth_req); rad_req_free(rpd->auth_req);
rpd->auth_req = NULL; rpd->auth_req = NULL;
...@@ -540,9 +538,6 @@ int rad_auth_mschap_v2(struct radius_pd_t *rpd, const char *username, va_list ar ...@@ -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; *reply_msg = ra->val.string;
} }
return r;
out: out:
rad_req_free(rpd->auth_req); rad_req_free(rpd->auth_req);
rpd->auth_req = NULL; rpd->auth_req = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册