diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2013-01-24 16:14:56 +0100 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-01-25 00:05:46 +0400 |
commit | 51465188daa66d3997a67afc9e017c032c2c7e2d (patch) | |
tree | 39e8603772ae39a6479b522a23510df4c4707517 /accel-pppd | |
parent | 795fb509b957c81a2ffa22e60d82016e97bae8a6 (diff) | |
download | accel-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>
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index b2447cd6..1534c9e9 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)); |