svn commit: r220408 - stable/8/sys/netinet/ipfw

Andrey V. Elsukov ae at FreeBSD.org
Thu Apr 7 06:01:10 UTC 2011


Author: ae
Date: Thu Apr  7 06:01:09 2011
New Revision: 220408
URL: http://svn.freebsd.org/changeset/base/220408

Log:
  MFC r220203:
    Fix a memory leak. Memory that is allocated for schedulers hash table
    was not freed.
  
    PR:		kern/156083

Modified:
  stable/8/sys/netinet/ipfw/ip_dummynet.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netinet/ipfw/ip_dummynet.c
==============================================================================
--- stable/8/sys/netinet/ipfw/ip_dummynet.c	Thu Apr  7 05:58:21 2011	(r220407)
+++ stable/8/sys/netinet/ipfw/ip_dummynet.c	Thu Apr  7 06:01:09 2011	(r220408)
@@ -747,9 +747,10 @@ schk_delete_cb(void *obj, void *arg)
 #endif
 	fsk_detach_list(&s->fsk_list, arg ? DN_DESTROY : 0);
 	/* no more flowset pointing to us now */
-	if (s->sch.flags & DN_HAVE_MASK)
+	if (s->sch.flags & DN_HAVE_MASK) {
 		dn_ht_scan(s->siht, si_destroy, NULL);
-	else if (s->siht)
+		dn_ht_free(s->siht, 0);
+	} else if (s->siht)
 		si_destroy(s->siht, NULL);
 	if (s->profile) {
 		free(s->profile, M_DUMMYNET);


More information about the svn-src-stable-8 mailing list