l2tpd_packet: add msgb_free() after sending the message

This commit is contained in:
Alexander Couzens 2016-11-02 20:46:08 +01:00 committed by Harald Welte
parent 9b7111c3a2
commit bc48fe2f98
1 changed files with 2 additions and 0 deletions

View File

@ -308,6 +308,8 @@ static int l2tp_msgb_tx(struct msgb *msg, int not_ack)
/* FIXME: put in the queue for reliable re-transmission */
ret = sendto(l2i->l2tp_ofd.fd, msgb_data(msg), msgb_length(msg), 0, &l2c->remote.ss, sizeof(l2c->remote.ss));
msgb_free(msg);
if (ret < 0)
return ret;
return 0;