aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device/dev_pager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/device/dev_pager.c b/device/dev_pager.c
index 38f0f8d4..6729d507 100644
--- a/device/dev_pager.c
+++ b/device/dev_pager.c
@@ -235,7 +235,7 @@ void dev_pager_hash_delete(const ipc_port_t name_port)
}
}
simple_unlock(&dev_pager_hash_lock);
- if (entry)
+ if (!queue_end(bucket, &entry->links))
kmem_cache_free(&dev_pager_hash_cache, (vm_offset_t)entry);
}
@@ -313,7 +313,7 @@ void dev_device_hash_delete(
}
}
simple_unlock(&dev_device_hash_lock);
- if (entry)
+ if (!queue_end(bucket, &entry->links))
kmem_cache_free(&dev_device_hash_cache, (vm_offset_t)entry);
}