From c3d54d03757fcb656cc4839a2c7978d97f75508d Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 16 Aug 2017 16:50:46 -0700 Subject: [PATCH] ralloc: Allow reparenting to a NULL context MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Tapani Pälli Reviewed-by: Ian Romanick Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- src/util/ralloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ralloc.c b/src/util/ralloc.c index 9cce9e0..42cfa2e 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); -- 2.7.4