summaryrefslogtreecommitdiffstats
path: root/src/util/ralloc.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-16 16:50:46 -0700
committerJason Ekstrand <[email protected]>2017-10-12 22:39:31 -0700
commitc3d54d03757fcb656cc4839a2c7978d97f75508d (patch)
tree0007c07c75c8004d318be4fa998e666332e5cca5 /src/util/ralloc.c
parent2e317a4b6d77ab078bdc9b21765f6051c4577c5e (diff)
ralloc: Allow reparenting to a NULL context
Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/util/ralloc.c')
-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);