aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_module.c
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1998-10-03 11:05:45 +0000
committerDoug Rabson <dfr@FreeBSD.org>1998-10-03 11:05:45 +0000
commit780330ee008af7d818ecde49b9b5eda2497dfba3 (patch)
tree08429c20886c8ecb9aaeecfd5940b6afb38b6705 /sys/kern/kern_module.c
parent7fb2045a4101182ce5f59f42fd89ce705e9363a4 (diff)
downloadsrc-780330ee008af7d818ecde49b9b5eda2497dfba3.tar.gz
src-780330ee008af7d818ecde49b9b5eda2497dfba3.zip
Send a MOD_UNLOAD event before deleting the module. if the MOD_LOAD event
failed.
Notes
Notes: svn path=/head/; revision=39916
Diffstat (limited to 'sys/kern/kern_module.c')
-rw-r--r--sys/kern/kern_module.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c
index 948fa79f97cd..8b7504963f22 100644
--- a/sys/kern/kern_module.c
+++ b/sys/kern/kern_module.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: kern_module.c,v 1.7 1998/07/11 07:45:40 bde Exp $
+ * $Id: kern_module.c,v 1.8 1998/07/14 05:09:45 bde Exp $
*/
#include <sys/param.h>
@@ -114,6 +114,7 @@ module_register(const char* name, modeventhand_t handler, void* arg)
newmod->file = 0;
if (error = MOD_EVENT(newmod, MOD_LOAD)) {
+ MOD_EVENT(newmod, MOD_UNLOAD);
module_release(newmod);
return error;
}