Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net/npf Fix kmem_free() in hashmap_remove().
details: https://anonhg.NetBSD.org/src/rev/423df3c86fcc
branches: trunk
changeset: 349868:423df3c86fcc
user: rmind <rmind%NetBSD.org@localhost>
date: Mon Dec 26 21:16:06 2016 +0000
description:
Fix kmem_free() in hashmap_remove().
diffstat:
sys/net/npf/lpm.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r dd7ce9c4fbe7 -r 423df3c86fcc sys/net/npf/lpm.c
--- a/sys/net/npf/lpm.c Mon Dec 26 20:52:39 2016 +0000
+++ b/sys/net/npf/lpm.c Mon Dec 26 21:16:06 2016 +0000
@@ -31,7 +31,7 @@
#if defined(_KERNEL)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lpm.c,v 1.2 2016/12/26 12:44:10 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lpm.c,v 1.3 2016/12/26 21:16:06 rmind Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -245,7 +245,7 @@
} else {
hmap->bucket[i] = entry->next;
}
- free(entry, M_TEMP);
+ kmem_free(entry, offsetof(lpm_ent_t, key[len]));
return 0;
}
prev = entry;
Home |
Main Index |
Thread Index |
Old Index