summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2013-01-24 16:14:56 +0100
committerKozlov Dmitry <xeb@mail.ru>2013-01-25 00:05:46 +0400
commit51465188daa66d3997a67afc9e017c032c2c7e2d (patch)
tree39e8603772ae39a6479b522a23510df4c4707517
parent795fb509b957c81a2ffa22e60d82016e97bae8a6 (diff)
downloadaccel-ppp-51465188daa66d3997a67afc9e017c032c2c7e2d.tar.gz
accel-ppp-51465188daa66d3997a67afc9e017c032c2c7e2d.zip
l2tp: Close tunnel handler's FD if TID assignment fails
Use l2tp_tunnel_alloc() cleanup code for handling TID assignment failure. The previous manual cleanup did not close the triton handler file descriptor. Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index b2447cd..1534c9e 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -624,8 +624,7 @@ static int l2tp_tunnel_alloc(struct l2tp_serv_t *serv, struct l2tp_packet_t *pac
if (!conn->tid) {
if (conf_verbose)
log_warn("l2tp: no free tid available\n");
- mempool_free(conn);
- return -1;
+ goto out_err;
}
memcpy(&conn->lac_addr, &pack->addr, sizeof(pack->addr));