diff mbox series

[v2,08/15] migration: Free removed SaveStateEntry

Message ID 20240627-san-v2-8-750bb0946dbd@daynix.com (mailing list archive)
State New, archived
Headers show
Series Fix check-qtest-ppc64 sanitizer errors | expand

Commit Message

Akihiko Odaki June 27, 2024, 1:37 p.m. UTC
This fixes LeakSanitizer warnings.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
 migration/savevm.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Fabiano Rosas Aug. 2, 2024, 12:47 p.m. UTC | #1
On Thu, 27 Jun 2024 22:37:51 +0900, Akihiko Odaki wrote:
> This fixes LeakSanitizer warnings.
> 
> 

Queued, thanks!
diff mbox series

Patch

diff --git a/migration/savevm.c b/migration/savevm.c
index c621f2359ba3..10b261823b7c 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -874,6 +874,8 @@  int vmstate_replace_hack_for_ppc(VMStateIf *obj, int instance_id,
 
     if (se) {
         savevm_state_handler_remove(se);
+        g_free(se->compat);
+        g_free(se);
     }
     return vmstate_register(obj, instance_id, vmsd, opaque);
 }