CID 56: Fix the wrong NULL check.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27478 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ebcba0bec8
commit
2391ca5568
@ -783,7 +783,7 @@ arch_vm_translation_map_init_map(vm_translation_map *map, bool kernel)
|
|||||||
recursive_lock_init(&map->lock, "translation map");
|
recursive_lock_init(&map->lock, "translation map");
|
||||||
|
|
||||||
map->arch_data = (vm_translation_map_arch_info *)malloc(sizeof(vm_translation_map_arch_info));
|
map->arch_data = (vm_translation_map_arch_info *)malloc(sizeof(vm_translation_map_arch_info));
|
||||||
if (map == NULL) {
|
if (map->arch_data == NULL) {
|
||||||
recursive_lock_destroy(&map->lock);
|
recursive_lock_destroy(&map->lock);
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user