From 2d1d7071013a43a6fe9401f7e85f0655ba6f9d72 Mon Sep 17 00:00:00 2001 From: dyoung Date: Mon, 13 Nov 2006 05:48:00 +0000 Subject: [PATCH] Plug memory leak. --- sys/netinet/in_selsrc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/netinet/in_selsrc.c b/sys/netinet/in_selsrc.c index a6469b3afffd..a8acdc2a23bd 100644 --- a/sys/netinet/in_selsrc.c +++ b/sys/netinet/in_selsrc.c @@ -1,4 +1,4 @@ -/* $NetBSD: in_selsrc.c,v 1.1 2006/11/13 05:13:42 dyoung Exp $ */ +/* $NetBSD: in_selsrc.c,v 1.2 2006/11/13 05:48:00 dyoung Exp $ */ /*- * Copyright (c) 2005 David Young. All rights reserved. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in_selsrc.c,v 1.1 2006/11/13 05:13:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_selsrc.c,v 1.2 2006/11/13 05:48:00 dyoung Exp $"); #include "opt_inet.h" #include "opt_inet_conf.h" @@ -574,11 +574,14 @@ void in_domifdetach(struct ifnet *ifp __unused, void *aux) { struct in_ifsysctl *isc; + struct in_ifselsrc *iss; if (aux == NULL) return; isc = (struct in_ifsysctl *)aux; + iss = isc->isc_selsrc; sysctl_teardown(&isc->isc_log); free(isc, M_IFADDR); + free(iss, M_IFADDR); } #endif /* INET */