Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Harmless alloc inconsistency; make sure the exact sa...
details: https://anonhg.NetBSD.org/src/rev/af59e26aba80
branches: trunk
changeset: 341140:af59e26aba80
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Oct 20 14:46:45 2015 +0000
description:
Harmless alloc inconsistency; make sure the exact same argument is given to
kmem_alloc/kmem_free. Found by Brainy.
diffstat:
sys/net/if_bridge.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r b87bf146faa6 -r af59e26aba80 sys/net/if_bridge.c
--- a/sys/net/if_bridge.c Tue Oct 20 13:27:36 2015 +0000
+++ b/sys/net/if_bridge.c Tue Oct 20 14:46:45 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bridge.c,v 1.103 2015/10/07 08:48:04 ozaki-r Exp $ */
+/* $NetBSD: if_bridge.c,v 1.104 2015/10/20 14:46:45 maxv Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.103 2015/10/07 08:48:04 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.104 2015/10/20 14:46:45 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_bridge_ipf.h"
@@ -2181,7 +2181,7 @@
count = sc->sc_brtcnt;
if (count == 0)
return;
- brt_list = kmem_alloc(sizeof(struct bridge_rtnode *) * count, KM_SLEEP);
+ brt_list = kmem_alloc(sizeof(*brt_list) * count, KM_SLEEP);
BRIDGE_RT_LOCK(sc);
BRIDGE_RT_INTR_LOCK(sc);
Home |
Main Index |
Thread Index |
Old Index