svn commit: r204754 - head/sys/netinet/ipfw

Luigi Rizzo luigi at FreeBSD.org
Fri Mar 5 12:58:19 UTC 2010


Author: luigi
Date: Fri Mar  5 12:58:19 2010
New Revision: 204754
URL: http://svn.freebsd.org/changeset/base/204754

Log:
  fix a memory leak when deleting RED queues

Modified:
  head/sys/netinet/ipfw/ip_dummynet.c

Modified: head/sys/netinet/ipfw/ip_dummynet.c
==============================================================================
--- head/sys/netinet/ipfw/ip_dummynet.c	Fri Mar  5 11:11:42 2010	(r204753)
+++ head/sys/netinet/ipfw/ip_dummynet.c	Fri Mar  5 12:58:19 2010	(r204754)
@@ -595,6 +595,12 @@ fsk_detach(struct dn_fsk *fs, int flags)
 		h = fs->sched ? &fs->sched->fsk_list : &dn_cfg.fsu;
 		SLIST_REMOVE(h, fs, dn_fsk, sch_chain);
 	}
+	/* Free the RED parameters, they will be recomputed on
+	 * subsequent attach if needed.
+	 */
+	if (fs->w_q_lookup)
+		free(fs->w_q_lookup, M_DUMMYNET);
+	fs->w_q_lookup = NULL;
 	qht_delete(fs, flags);
 	if (fs->sched && fs->sched->fp->free_fsk)
 		fs->sched->fp->free_fsk(fs);


More information about the svn-src-all mailing list