summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-12-18 02:48:34 -0800
committerKenneth Graunke <kenneth@whitecape.org>2015-12-18 23:30:51 -0800
commit14193e4643370db92210710f2ef152c693d6c4ff (patch)
treea2571b0118751c2b26fbf6a6c2f1a7e815640b62 /src/util
parentb476c587e3c8ffd61e833c3252d69c5edd16c0f6 (diff)
downloadexternal_mesa3d-14193e4643370db92210710f2ef152c693d6c4ff.zip
external_mesa3d-14193e4643370db92210710f2ef152c693d6c4ff.tar.gz
external_mesa3d-14193e4643370db92210710f2ef152c693d6c4ff.tar.bz2
ralloc: Fix ralloc_adopt() to the old context's last child's parent.
I was cleverly using one iteration to obtain a pointer to the last item in ralloc's singly list child list, while also setting parents. Unfortunately, I forgot to set the parent on that last item. Cc: "11.1 11.0 10.6" <mesa-stable@lists.freedesktop.org> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/ralloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/ralloc.c b/src/util/ralloc.c
index bb4cf96..6d4032b 100644
--- a/src/util/ralloc.c
+++ b/src/util/ralloc.c
@@ -293,6 +293,7 @@ ralloc_adopt(const void *new_ctx, void *old_ctx)
/* Connect the two lists together; parent them to new_ctx; make old_ctx empty. */
child->next = new_info->child;
+ child->parent = new_info;
new_info->child = old_info->child;
old_info->child = NULL;
}