util/ralloc: set prev-pointers correctly in ralloc_adopt
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Sat, 26 Aug 2017 01:06:09 +0000 (03:06 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 6 Sep 2017 07:56:19 +0000 (09:56 +0200)
commit1e247511e54767667a0a9ac0c06f3206beb005af
tree09c563af91ed31bf48d85d603d4c1e9bd5611517
parent94f740e3fce0cb26e4d90cb9de75b5d971080606
util/ralloc: set prev-pointers correctly in ralloc_adopt

Found by inspection.

I'm not aware of any actual failures caused by this, but a precise
sequence of ralloc_adopt and ralloc_free should be able to cause
problems.

v2: make the code slightly clearer (Eric)

Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/util/ralloc.c