From c80d2145d2dd0062560cff50186fbb38964c2bfd Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Wed, 13 Mar 2013 18:43:21 +0100 Subject: 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 --- accel-pppd/ctrl/l2tp/l2tp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'accel-pppd/ctrl') diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index f5a5d3c..f784135 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)); -- cgit v1.2.3