[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 01/19] migration: Postpone releasing MigrationState.hostna
From: |
Peter Xu |
Subject: |
Re: [PATCH v4 01/19] migration: Postpone releasing MigrationState.hostname |
Date: |
Wed, 20 Apr 2022 14:19:25 -0400 |
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é <berrange@redhat.com>
Thanks,
--
Peter Xu