From 16575d28ed0092ec5e1ea90ec7c6ef2b975191ec Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Fri, 15 Mar 2013 21:48:12 +0100 Subject: l2tp: Free tunnels that couldn't start When starting a tunnel created upon user request, free it in case of error. Signed-off-by: Guillaume Nault --- accel-pppd/ctrl/l2tp/l2tp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index d1b0831..c65bcd8 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -3374,6 +3374,7 @@ static int l2tp_create_tunnel_exec(const char *cmd, char * const *fields, if (l2tp_tunnel_start(conn, l2tp_send_SCCRQ, &peer) < 0) { cli_send(client, "starting tunnel failed\r\n"); + l2tp_tunnel_free(conn); return CLI_CMD_FAILED; } -- cgit v1.2.3