|
@@ -55,8 +55,10 @@ void *module_alloc(unsigned long size)
|
|
/* Free memory returned from module_alloc */
|
|
/* Free memory returned from module_alloc */
|
|
void module_free(struct module *mod, void *module_region)
|
|
void module_free(struct module *mod, void *module_region)
|
|
{
|
|
{
|
|
- vfree(mod->arch.syminfo);
|
|
|
|
- mod->arch.syminfo = NULL;
|
|
|
|
|
|
+ if (mod) {
|
|
|
|
+ vfree(mod->arch.syminfo);
|
|
|
|
+ mod->arch.syminfo = NULL;
|
|
|
|
+ }
|
|
vfree(module_region);
|
|
vfree(module_region);
|
|
}
|
|
}
|
|
|
|
|