[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/34] migration/multifd: Fix p->iov leak in multifd-uadk.c
From: |
Fabiano Rosas |
Subject: |
[PULL 30/34] migration/multifd: Fix p->iov leak in multifd-uadk.c |
Date: |
Wed, 4 Sep 2024 09:44:13 -0300 |
The send_cleanup() hook should free the p->iov that was allocated at
send_setup(). This was missed because the UADK code is conditional on
the presence of the accelerator, so it's not tested by default.
Fixes: 819dd20636 ("migration/multifd: Add UADK initialization")
Reported-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
migration/multifd-uadk.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/migration/multifd-uadk.c b/migration/multifd-uadk.c
index 89f6a72f0e..6e6a290ae9 100644
--- a/migration/multifd-uadk.c
+++ b/migration/multifd-uadk.c
@@ -132,6 +132,8 @@ static void multifd_uadk_send_cleanup(MultiFDSendParams *p,
Error **errp)
multifd_uadk_uninit_sess(wd);
p->compress_data = NULL;
+ g_free(p->iov);
+ p->iov = NULL;
}
static inline void prepare_next_iov(MultiFDSendParams *p, void *base,
--
2.35.3
- [PULL 24/34] migration/multifd: Allow multifd sync without flush, (continued)
- [PULL 24/34] migration/multifd: Allow multifd sync without flush, Fabiano Rosas, 2024/09/04
- [PULL 25/34] migration/multifd: Standardize on multifd ops names, Fabiano Rosas, 2024/09/04
- [PULL 26/34] migration/multifd: Register nocomp ops dynamically, Fabiano Rosas, 2024/09/04
- [PULL 27/34] migration/multifd: Move nocomp code into multifd-nocomp.c, Fabiano Rosas, 2024/09/04
- [PULL 29/34] migration/multifd: Stop changing the packet on recv side, Fabiano Rosas, 2024/09/04
- [PULL 28/34] migration/multifd: Make MultiFDMethods const, Fabiano Rosas, 2024/09/04
- [PULL 30/34] migration/multifd: Fix p->iov leak in multifd-uadk.c,
Fabiano Rosas <=
- [PULL 33/34] target/ppc: Fix migration of CPUs with TLB_EMB TLB type, Fabiano Rosas, 2024/09/04
- [PULL 31/34] migration/multifd: Add a couple of asserts for p->iov, Fabiano Rosas, 2024/09/04
- [PULL 32/34] migration/multifd: Add documentation for multifd methods, Fabiano Rosas, 2024/09/04
- [PULL 34/34] tests/qtest/migration: Add a check for the availability of the "pc" machine, Fabiano Rosas, 2024/09/04
- Re: [PULL 00/34] Migration patches for 2024-09-04, Peter Maydell, 2024/09/05
- Re: [PULL 00/34] Migration patches for 2024-09-04, Peter Maydell, 2024/09/06