diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2002-06-18 19:28:06 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2002-06-18 19:28:06 +0000 |
commit | 010c7f46b58d5c5e4995cef428d49cebc2117d75 (patch) | |
tree | 147eca77868e7dcbc452af872ad5d2d7ad31237c /sys/netinet | |
parent | 285b7314960d3f2b27178faa4037ade8d6686c1f (diff) |
Fix double-free.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_ipcomp.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c index 2ddc5ff520c..65004517da0 100644 --- a/sys/netinet/ip_ipcomp.c +++ b/sys/netinet/ip_ipcomp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipcomp.c,v 1.2 2002/06/09 16:26:10 itojun Exp $ */ +/* $OpenBSD: ip_ipcomp.c,v 1.3 2002/06/18 19:28:05 angelos Exp $ */ /* * Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org) @@ -644,7 +644,8 @@ ipcomp_output_cb(cp) DPRINTF(("ipcomp_output_cb(): TDB expired while in crypto\n")); goto baddone; } - /* Check for crypto errors */ + + /* Check for crypto errors. */ if (crp->crp_etype) { /* Reset session ID */ if (tdb->tdb_cryptoid != 0) @@ -663,23 +664,22 @@ ipcomp_output_cb(cp) /* Shouldn't happen... */ if (m == NULL) { ipcompstat.ipcomps_crypto++; - DPRINTF( - ("ipcomp_output_cb(): bogus returned buffer from crypto\n" - )); + DPRINTF(("ipcomp_output_cb(): bogus returned buffer from " + "crypto\n")); error = EINVAL; goto baddone; } - /* Check sizes */ + + /* Check sizes. */ if (rlen < crp->crp_olen) { - /* compression was useless, we have lost time */ - FREE(tc, M_XDATA); + /* Compression was useless, we have lost time. */ crypto_freereq(crp); error = ipsp_process_done(m, tdb); splx(s); return error; } - /* Adjust the length in the IP header */ + /* Adjust the length in the IP header. */ switch (tdb->tdb_dst.sa.sa_family) { #ifdef INET @@ -697,8 +697,8 @@ ipcomp_output_cb(cp) #endif /* INET6 */ default: - DPRINTF( - ("ipcomp_output(): unknown/unsupported protocol family %d, IPCA %s/%08x\n", + DPRINTF(("ipcomp_output(): unknown/unsupported protocol " + "family %d, IPCA %s/%08x\n", tdb->tdb_dst.sa.sa_family, ipsp_address(tdb->tdb_dst), ntohl(tdb->tdb_spi))); m_freem(m); @@ -707,7 +707,7 @@ ipcomp_output_cb(cp) break; } - /* Release the crypto descriptor */ + /* Release the crypto descriptor. */ crypto_freereq(crp); error = ipsp_process_done(m, tdb); |