Module Name: src
Committed By: pooka
Date: Tue May 20 19:53:50 UTC 2014
Modified Files:
src/sys/net: if_loop.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/net/if_loop.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/if_loop.c
diff -u src/sys/net/if_loop.c:1.77 src/sys/net/if_loop.c:1.78
--- src/sys/net/if_loop.c:1.77 Tue May 13 19:36:16 2014
+++ src/sys/net/if_loop.c Tue May 20 19:53:50 2014
@@ -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 @@ loop_clone_destroy(struct ifnet *ifp)
bpf_detach(ifp);
if_detach(ifp);
- free(ifp, M_DEVBUF);
+ if_free(ifp);
return (0);
}