Module Name: src Committed By: snj Date: Tue Dec 27 07:03:53 UTC 2016
Modified Files: src/sys/net/npf [netbsd-7]: lpm.c Log Message: Pull up following revision(s) (requested by rmind in ticket #1340): sys/net/npf/lpm.c: revision 1.3 Fix kmem_free() in hashmap_remove(). To generate a diff of this commit: cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/net/npf/lpm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/npf/lpm.c diff -u src/sys/net/npf/lpm.c:1.1.2.3 src/sys/net/npf/lpm.c:1.1.2.4 --- src/sys/net/npf/lpm.c:1.1.2.3 Mon Dec 26 18:55:08 2016 +++ src/sys/net/npf/lpm.c Tue Dec 27 07:03:52 2016 @@ -31,7 +31,7 @@ #if defined(_KERNEL) #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lpm.c,v 1.1.2.3 2016/12/26 18:55:08 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lpm.c,v 1.1.2.4 2016/12/27 07:03:52 snj Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -245,7 +245,7 @@ hashmap_remove(lpm_hmap_t *hmap, const v } else { hmap->bucket[i] = entry->next; } - free(entry, M_TEMP); + kmem_free(entry, offsetof(lpm_ent_t, key[len])); return 0; } prev = entry;