diff options
author | Fabiano Rosas <farosas@suse.de> | 2024-08-28 11:56:48 -0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2024-09-25 21:05:48 +0300 |
commit | 9cd1fd4b5025df866eb0bd8a86230e83ae049882 (patch) | |
tree | 7de19a38efab3565035a9cff811d5bcff6b81424 | |
parent | f84b79a8fcf46d73bc2345cf14ca863fa8e05ea6 (diff) |
migration/multifd: Fix p->iov leak in multifd-uadk.c
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>
(cherry picked from commit 405e352d28c24991cacfdebccf67d56c4795cf6e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r-- | migration/multifd-uadk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/multifd-uadk.c b/migration/multifd-uadk.c index d12353fb21..9a582fc919 100644 --- a/migration/multifd-uadk.c +++ b/migration/multifd-uadk.c @@ -146,6 +146,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, |