Re: [Spice-devel] [PATCH spice-server] replay: Avoid double free of primary surface

2017-02-08 Thread Christophe Fergeau
On Wed, Feb 08, 2017 at 01:00:00PM +, Frediano Ziglio wrote: > read_binary attach mem to allocated list. read_binary() attaches 'mem' to the SpiceReplay::allocated list > On failure all memory attached to allocated list are freed On failure, SpiceReplay::allocated and its content are freed b

[Spice-devel] [PATCH spice-server] replay: Avoid double free of primary surface

2017-02-08 Thread Frediano Ziglio
read_binary attach mem to allocated list. On failure all memory attached to allocated list are freed but also replay->primary_mem is freed causing the double free. Note that this double free can happen only on currupted or wrong record images. Signed-off-by: Frediano Ziglio --- server/red-replay