[S390] kprobes: add parameter check to module_free()
[safe/jmp/linux-2.6] / arch / s390 / kernel / module.c
index 639380a..22cfd63 100644 (file)
@@ -55,8 +55,10 @@ void *module_alloc(unsigned long size)
 /* Free memory returned from module_alloc */
 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);
 }