From 49165189ad0dfde6404c29b8eec0ef6ea91125b2 Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 20 May 2014 19:53:50 +0000 Subject: [PATCH] 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 --- sys/net/if_loop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 8a3b81ca6d41..e54522ff214a 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -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 -__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 @@ loop_clone_destroy(struct ifnet *ifp) bpf_detach(ifp); if_detach(ifp); - free(ifp, M_DEVBUF); + if_free(ifp); return (0); }