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/823a7cf32ccc
branches:  trunk
changeset: 811282:823a7cf32ccc
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 d0713b928ffd -r 823a7cf32ccc 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