Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 plug a memory leak. from sam leffler. sync w/...
details: https://anonhg.NetBSD.org/src/rev/f0203fd1a999
branches: trunk
changeset: 538833:f0203fd1a999
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Oct 31 17:36:16 2002 +0000
description:
plug a memory leak. from sam leffler. sync w/kame
diffstat:
sys/netinet6/ip6_output.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r e1185c1c1179 -r f0203fd1a999 sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Thu Oct 31 17:14:46 2002 +0000
+++ b/sys/netinet6/ip6_output.c Thu Oct 31 17:36:16 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_output.c,v 1.58 2002/09/23 13:28:55 itojun Exp $ */
+/* $NetBSD: ip6_output.c,v 1.59 2002/10/31 17:36:16 itojun Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.58 2002/09/23 13:28:55 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.59 2002/10/31 17:36:16 itojun Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -1654,8 +1654,7 @@
/*
* Only turning off any previous options.
*/
- if (opt)
- free(opt, M_IP6OPT);
+ free(opt, M_IP6OPT);
if (m)
(void)m_free(m);
return (0);
@@ -1666,6 +1665,7 @@
priv = 1;
if ((error = ip6_setpktoptions(m, opt, priv)) != 0) {
(void)m_free(m);
+ free(opt, M_IP6OPT);
return (error);
}
*pktopt = opt;
Home |
Main Index |
Thread Index |
Old Index