Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-compat]: src/sys/kern When freeing the required list, make sure...
details: https://anonhg.NetBSD.org/src/rev/89f371235cbe
branches: pgoyette-compat
changeset: 830630:89f371235cbe
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Sep 09 11:54:10 2018 +0000
description:
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.
diffstat:
sys/kern/kern_module.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r a71a86c59782 -r 89f371235cbe sys/kern/kern_module.c
--- a/sys/kern/kern_module.c Sun Sep 09 11:51:48 2018 +0000
+++ b/sys/kern/kern_module.c Sun Sep 09 11:54:10 2018 +0000
@@ -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 @@
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));
}
Home |
Main Index |
Thread Index |
Old Index