summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/stackdepot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 09485dc5bd12..f034f095c627 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -231,6 +231,9 @@ unsigned int stack_depot_fetch(depot_stack_handle_t handle,
struct stack_record *stack;
*entries = NULL;
+ if (!handle)
+ return 0;
+
if (parts.slabindex > depot_index) {
WARN(1, "slab index %d out of bounds (%d) for stack id %08x\n",
parts.slabindex, depot_index, handle);