Module Name:    src
Committed By:   pgoyette
Date:           Sun Sep  9 11:54:10 UTC 2018

Modified Files:
        src/sys/kern [pgoyette-compat]: kern_module.c

Log Message:
When freeing the required list, make sure we calculate its size based
on the size of the contained elements, not on the size of a pointer to
those elements.


To generate a diff of this commit:
cvs rdiff -u -r1.130.2.22 -r1.130.2.23 src/sys/kern/kern_module.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/kern/kern_module.c
diff -u src/sys/kern/kern_module.c:1.130.2.22 src/sys/kern/kern_module.c:1.130.2.23
--- src/sys/kern/kern_module.c:1.130.2.22	Fri Sep  7 23:32:30 2018
+++ src/sys/kern/kern_module.c	Sun Sep  9 11:54:10 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.130.2.22 2018/09/07 23:32:30 pgoyette Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.130.2.23 2018/09/09 11:54:10 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.130.2.22 2018/09/07 23:32:30 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.130.2.23 2018/09/09 11:54:10 pgoyette Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -245,7 +245,7 @@ module_free(module_t *mod)
 	specificdata_fini(module_specificdata_domain, &mod->mod_sdref);
 	if (mod->mod_required)
 		kmem_free(mod->mod_required, mod->mod_arequired *
-		    sizeof(module_t));
+		    sizeof(module_t *));
 	kmem_free(mod, sizeof(*mod));
 }
 

Reply via email to