diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-04-29 07:14:12 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-04-29 07:14:12 +0000 |
commit | 514246abcc4c62b7e2e6cdac64f799d074c3eea9 (patch) | |
tree | 5dbb750860f95efb4d5ee89ee9b6a6c09ca14724 /sys | |
parent | 8ae349c5ed589e74d1df898832c03ccecac032be (diff) |
after freeing curp, set to NULL. fixes a crash when loading a module
twice. similar to patch from Even Farrer farrer at uofu.net
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_lkm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index b365b50babe..d74c1555a68 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_lkm.c,v 1.37 2002/03/14 01:27:04 millert Exp $ */ +/* $OpenBSD: kern_lkm.c,v 1.38 2003/04/29 07:14:11 tedu Exp $ */ /* $NetBSD: kern_lkm.c,v 1.31 1996/03/31 21:40:27 christos Exp $ */ /* @@ -165,6 +165,7 @@ lkmfree(struct lkm_table *p) TAILQ_REMOVE(&lkmods, p, list); free(p, M_DEVBUF); + curp = NULL; nlkms--; } |