diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2010-12-21 14:45:58 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2010-12-21 14:45:58 +0000 |
commit | 1a7fe0231942d0e57909a2e6458fbcd0d2a5a8e0 (patch) | |
tree | a63372bb15e672b4ad33854937414d87c03e00d4 /sys | |
parent | c60c16e6b6f517057bf7b13c0423b156f6883117 (diff) |
don't leak mbuf if padding failes; ok mikeb@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_esp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 5a3cfcbe55b..dc3705b3c7c 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.114 2010/10/06 22:19:20 mikeb Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.115 2010/12/21 14:45:57 markus Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -932,6 +932,7 @@ esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, if (mo == NULL) { DPRINTF(("esp_output(): m_inject failed for SA %s/%08x\n", ipsp_address(tdb->tdb_dst), ntohl(tdb->tdb_spi))); + m_freem(m); return ENOBUFS; } pad = mtod(mo, u_char *); |