"Dr. David Alan Gilbert" <dgilb...@redhat.com> wrote:
> * Juan Quintela (quint...@redhat.com) wrote:
>> Once there, I rename ram_migration_cleanup() to ram_save_cleanup().
>> Notice that this is the first pass, and I only passed XBZRLE to the
>> new scheme.  Moved decoded_buf to inside XBZRLE struct.
>> As a bonus, I don't have to export xbzrle functions from ram.c.
>> 
>> Signed-off-by: Juan Quintela <quint...@redhat.com>

>>      }
>>      /* load data and decode */
>> -    qemu_get_buffer_in_place(f, &loaded_data, xh_len);
>> +    qemu_get_buffer_in_place(f, &XBZRLE.decoded_buf, xh_len);
>
> No !  Note the & - loaded_data can get changed at that point to
> point to an internal buffer rather than using that temporary.
>
> So you still need the loaded_data and use that in the rest of
> this function.

You are right.

I hate that nuances.

Thanks for the review.

Later, Juan.

Reply via email to