diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-03-13 18:43:21 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-03-15 23:59:32 +0400 |
commit | c80d2145d2dd0062560cff50186fbb38964c2bfd (patch) | |
tree | 4cc66f6bcb4730c9405fbd0ad4dc9a4c4497170d /accel-pppd/ctrl/l2tp | |
parent | 2ba26d60341771b4852587aaf548a73d123ccaa1 (diff) | |
download | accel-ppp-c80d2145d2dd0062560cff50186fbb38964c2bfd.tar.gz accel-ppp-c80d2145d2dd0062560cff50186fbb38964c2bfd.zip |
l2tp: Allocate memory with functions from memdebug.h
Use memdebug variants of {m,re}alloc() so that the corresponding
_free() will work correctly if MEMDEBUG is defined.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl/l2tp')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index f5a5d3c3..f7841358 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -317,7 +317,7 @@ static int l2tp_tunnel_storechall(struct l2tp_conn_t *conn, } if (conn->challenge_len != chall->length) { - ptr = realloc(conn->challenge, chall->length); + ptr = _realloc(conn->challenge, chall->length); if (ptr == NULL) { log_tunnel(log_error, conn, "impossible to store received" @@ -3338,8 +3338,8 @@ static void l2tp_init(void) { if (system("modprobe -q pppol2tp || modprobe -q l2tp_ppp")) log_warn("unable to load l2tp kernel module\n"); - - l2tp_conn = malloc(L2TP_MAX_TID * sizeof(void *)); + + l2tp_conn = _malloc(L2TP_MAX_TID * sizeof(void *)); memset(l2tp_conn, 0, L2TP_MAX_TID * sizeof(void *)); l2tp_conn_pool = mempool_create(sizeof(struct l2tp_conn_t)); |