diff options
author | luigi <luigi@FreeBSD.org> | 2010-03-05 12:58:19 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2010-03-05 12:58:19 +0000 |
commit | 3aef100f015a6480cac29fa12f44a99f7be5f669 (patch) | |
tree | 27a539106003bdf07a878d67611ffb8aefbf3470 /sys/netinet | |
parent | 8c36a84a3586384c2905a68e8b48be1f447df4cf (diff) | |
download | FreeBSD-src-3aef100f015a6480cac29fa12f44a99f7be5f669.zip FreeBSD-src-3aef100f015a6480cac29fa12f44a99f7be5f669.tar.gz |
fix a memory leak when deleting RED queues
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ipfw/ip_dummynet.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet/ipfw/ip_dummynet.c b/sys/netinet/ipfw/ip_dummynet.c index d49872c..8e45705 100644 --- a/sys/netinet/ipfw/ip_dummynet.c +++ b/sys/netinet/ipfw/ip_dummynet.c @@ -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); |