Browse Source

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>
pull/273/head
Fabiano Rosas 2 years ago
parent
commit
405e352d28
  1. 2
      migration/multifd-uadk.c

2
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,

Loading…
Cancel
Save