On Wed, Apr 20, 2022 at 11:34:16AM +0100, Daniel P. Berrangé wrote:
> > diff --git a/migration/migration.c b/migration/migration.c
> > index 695f0f2900..281d33326b 100644
> > --- a/migration/migration.c
> > +++ b/migration/migration.c
> > @@ -1809,6 +1809,11 @@ static void migrate_fd_cleanup(MigrationState *s)
> >      qemu_bh_delete(s->cleanup_bh);
> >      s->cleanup_bh = NULL;
> >  
> > +    if (s->hostname) {
> > +        g_free(s->hostname);
> > +        s->hostname = NULL;
> > +    }
> 
> FWIW there's a marginally more concise pattern:
> 
>   g_clear_pointer(&s->hostname, g_free)

Sounds good.

> 
> 
> Either way
> 
>    Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>

Thanks,

-- 
Peter Xu


Reply via email to