RE: [PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc()

2021-02-08 Thread gaojinhao
-devel@nongnu.org; Michael S . Tsirkin ; David Gibson ; Greg Kurz ; Marc-André Lureau ; Stefan Berger ; Jason Wang ; Juan Quintela ; Wanghaibin (D) ; zhukeqian Subject: Re: [PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc() * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote

Re: [PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc()

2021-02-08 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Jinhao Gao (gaojin...@huawei.com) wrote: > > Some memory allocated for fields having a flag of VMS_ALLOC in SaveState > > may not free before VM load vmsd in migration. So we pre-free memory before > > allocation in vmstate_handle_alloc() to

RE: [PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc()

2021-01-05 Thread gaojinhao
; Jason Wang ; Juan Quintela ; Wanghaibin (D) ; zhukeqian Subject: Re: [PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc() * Jinhao Gao (gaojin...@huawei.com) wrote: > Some memory allocated for fields having a flag of VMS_ALLOC in > SaveState may not free before VM load v

Re: [PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc()

2021-01-05 Thread Dr. David Alan Gilbert
* Jinhao Gao (gaojin...@huawei.com) wrote: > Some memory allocated for fields having a flag of VMS_ALLOC in SaveState > may not free before VM load vmsd in migration. So we pre-free memory before > allocation in vmstate_handle_alloc() to avoid memleaks. > > Reported-by: Euler Robot > Signed-off-b

[PATCH v3 3/3] vmstate: Fix memory leak in vmstate_handle_alloc()

2020-12-30 Thread Jinhao Gao
Some memory allocated for fields having a flag of VMS_ALLOC in SaveState may not free before VM load vmsd in migration. So we pre-free memory before allocation in vmstate_handle_alloc() to avoid memleaks. Reported-by: Euler Robot Signed-off-by: Jinhao Gao Signed-off-by: Michael S. Tsirkin ---