Module: Mesa
Branch: 11.0
Commit: 9aacd54337a611fcb46eea8f12e4082cb0866a6a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9aacd54337a611fcb46eea8f12e4082cb0866a6a

Author: Kenneth Graunke <[email protected]>
Date:   Fri Dec 18 02:48:34 2015 -0800

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" <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
(cherry picked from commit 14193e4643370db92210710f2ef152c693d6c4ff)

---

 src/util/ralloc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/ralloc.c b/src/util/ralloc.c
index 01719c8..643df76 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;
 }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to