summaryrefslogtreecommitdiff
path: root/accel-pptpd/radius/auth.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2010-09-20 01:09:07 +0400
committerDmitry Kozlov <xeb@mail.ru>2010-09-20 01:09:34 +0400
commitb96fbc3f966b012720d2b74b1dfd2a0ab95086cf (patch)
tree606750874faf65029f756dc0b401ee40cc4da89f /accel-pptpd/radius/auth.c
parentd860a4beaf5f99d5045d03b931b4829426a2f7b0 (diff)
downloadaccel-ppp-b96fbc3f966b012720d2b74b1dfd2a0ab95086cf.tar.gz
accel-ppp-b96fbc3f966b012720d2b74b1dfd2a0ab95086cf.zip
fixed many bugs and memory leaks
Diffstat (limited to 'accel-pptpd/radius/auth.c')
-rw-r--r--accel-pptpd/radius/auth.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/accel-pptpd/radius/auth.c b/accel-pptpd/radius/auth.c
index 92406b34..46adbd7a 100644
--- a/accel-pptpd/radius/auth.c
+++ b/accel-pptpd/radius/auth.c
@@ -9,6 +9,7 @@
#include "radius_p.h"
+#include "memdebug.h"
static uint8_t* encrypt_password(const char *passwd, const char *secret, const uint8_t *RA, int *epasswd_len)
{
@@ -19,7 +20,7 @@ static uint8_t* encrypt_password(const char *passwd, const char *secret, const u
chunk_cnt = (strlen(passwd) - 1) / 16 + 1;
- epasswd = malloc(chunk_cnt * 16);
+ epasswd = _malloc(chunk_cnt * 16);
if (!epasswd) {
log_emerg("radius: out of memory\n");
return NULL;
@@ -93,11 +94,11 @@ int rad_auth_pap(struct radius_pd_t *rpd, const char *username, va_list args)
goto out;
if (rad_packet_add_octets(req->pack, "User-Password", epasswd, epasswd_len)) {
- free(epasswd);
+ _free(epasswd);
goto out;
}
- free(epasswd);
+ _free(epasswd);
r = rad_auth_send(req);
if (r == PWDB_SUCCESS) {