On Thu, Aug 11, 2016 at 10:04 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
>
>> I think we should do
>>
>> s->vmstate = qemu_add_vm_change_state_handler(ide_restart_cb, bus);
>> instead of
>> qemu_add_vm_change_state_handler(ide_restart_cb, bus);
>>
>> in ide_register_restart_cb() in hw/ide/core.c to store the returned
>> pointer to memory to avoid a possible memory leak I guess and
>> introduce a VMChangeStateEntry field in struct AHCIState to handle
>> this. Same can then further be used with
>> qemu_del_vm_change_state_handler() in ahci_unrealize() to free things
>> up.
>
> Yes, this is correct. Thanks!
>
Alright I will make these changes and include them in my patch.

Ashijeet
> Paolo

Reply via email to