On Mon, Jan 05, 2026 at 04:06:39PM -0300, Fabiano Rosas wrote:
> When setting a callback on a Glib source and giving it a data pointer,
> it's natural to also provide the destructor for the data in question.
> 
> Since migrate_hup_add() already needs to clone the MigrationAddress
> when setting the qmp_migrate_finish_cb callback, also pass the
> qapi_free_MigrationAddress as the GDestroyNotify callback.
> 
> With this the address doesn't need to be freed at the callback body,
> making the management of that memory slight simpler.
> 
> (also fix the indentation of migrate_hup_add)
> 
> Cc: Mark Kanda <[email protected]>
> Cc: Ben Chaney <[email protected]>
> Signed-off-by: Fabiano Rosas <[email protected]>

Reviewed-by: Peter Xu <[email protected]>

-- 
Peter Xu


Reply via email to