From 8423e0ce7df25ddc09f40314a57e997dbd558050 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 12 Dec 2019 12:13:51 +0100 Subject: [PATCH] Module::new guard against NULL --- src/modules.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules.rs b/src/modules.rs index d96a2e9..021880d 100644 --- a/src/modules.rs +++ b/src/modules.rs @@ -23,6 +23,7 @@ impl Drop for Module { impl Module { #[inline] pub(crate) fn new(module: *mut kmod_module) -> Module { + assert!(!module.is_null()); trace!("creating kmod_module: {:?}", module); Module { inner: module,