summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/l2tp/l2tp.c
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-03-15 21:48:12 +0100
committerKozlov Dmitry <xeb@mail.ru>2013-03-16 08:34:46 +0400
commit16575d28ed0092ec5e1ea90ec7c6ef2b975191ec (patch)
tree807c9b61be33a017aa9e60e121285c187a399a60 /accel-pppd/ctrl/l2tp/l2tp.c
parentf7d4b0ba1c00c6e56af8e8b3ca64b09fb06f5ba7 (diff)
downloadaccel-ppp-16575d28ed0092ec5e1ea90ec7c6ef2b975191ec.tar.gz
accel-ppp-16575d28ed0092ec5e1ea90ec7c6ef2b975191ec.zip
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 <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd/ctrl/l2tp/l2tp.c')
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index d1b0831c..c65bcd8a 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;
}