aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util/ralloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/ralloc.c b/src/util/ralloc.c
index 9cce9e02f68..42cfa2e391d 100644
--- a/src/util/ralloc.c
+++ b/src/util/ralloc.c
@@ -285,7 +285,7 @@ ralloc_steal(const void *new_ctx, void *ptr)
return;
info = get_header(ptr);
- parent = get_header(new_ctx);
+ parent = new_ctx ? get_header(new_ctx) : NULL;
unlink_block(info);