rem: module->loaded_module = NULL;
add: module->module_image = NULL;
context: create_module(module_info *info, const char *file, int offset, module **_module){	module *module;	if (!info->name)		return B_BAD_VALUE;	module = (struct module *)hash_lookup(gModulesHash, info->name);	if (module) {		FATAL(("Duplicate module name (%s) detected... ignoring new one\n", info->name));		return B_FILE_EXISTS;	}	if ((module = (struct module *)malloc(sizeof(module))) == NULL)		return B_NO_MEMORY;	TRACE(("create_module(%s, %s)\n", info->name, file));	module->loaded_module = NULL;	module->name = strdup(info->name);	if (module->name == NULL) {		free(module);		return B_NO_MEMORY;	}	module->file = strdup(file);	if (module->file == NULL) {		free(module->name);		free(module);		return B_NO_MEMORY;	}	module->state = MODULE_QUERIED;	module->offset = offset;		// record where the module_info can be found in the module_info array	module->ref_count = 0;	if (info->flags & B_KEEP_LOADED) {		TRACE(("module %s wants to be kept loaded\n", module->name));		module->keep_loaded = true;	}	recursive_lock_lock(&gModulesLock);	hash_insert(gModulesHash, module);	recursive_lock_unlock(&gModulesLock);	if (_module)		*_module = module;	return B_OK;}