Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net if_free() instead of direct call to free() to avoid ...



details:   https://anonhg.NetBSD.org/src/rev/bd9c1ab0a6f0
branches:  trunk
changeset: 796115:bd9c1ab0a6f0
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue May 20 19:53:50 2014 +0000

description:
if_free() instead of direct call to free() to avoid diagnostic panic

Bug exposed by justin's Lua ljsyscall tests:
http://build.myriabit.eu:8012/waterfall

diffstat:

 sys/net/if_loop.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 799509c350ed -r bd9c1ab0a6f0 sys/net/if_loop.c
--- a/sys/net/if_loop.c Tue May 20 19:04:00 2014 +0000
+++ b/sys/net/if_loop.c Tue May 20 19:53:50 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_loop.c,v 1.77 2014/05/13 19:36:16 bouyer Exp $      */
+/*     $NetBSD: if_loop.c,v 1.78 2014/05/20 19:53:50 pooka Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.77 2014/05/13 19:36:16 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.78 2014/05/20 19:53:50 pooka Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -202,7 +202,7 @@
        bpf_detach(ifp);
        if_detach(ifp);
 
-       free(ifp, M_DEVBUF);
+       if_free(ifp);
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index