qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] migration: release MigrationIncomingState in mi


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH] migration: release MigrationIncomingState in migration_object_finalize
Date: Fri, 6 Jul 2018 11:41:53 +0100
User-agent: Mutt/1.10.0 (2018-05-17)

* Dr. David Alan Gilbert (address@hidden) wrote:
> * Lidong Chen (address@hidden) wrote:
> > Qemu initialize the MigrationIncomingState structure in 
> > migration_object_init,
> > but not release it. this patch release it in migration_object_finalize.
> > 
> > Signed-off-by: Lidong Chen <address@hidden>
> 
> Queued

I've had to unqueue this, see below:

> 
> > ---
> >  migration/migration.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/migration/migration.c b/migration/migration.c
> > index 05aec2c..e009a05 100644
> > --- a/migration/migration.c
> > +++ b/migration/migration.c
> > @@ -156,6 +156,13 @@ void migration_object_init(void)
> >  void migration_object_finalize(void)
> >  {
> >      object_unref(OBJECT(current_migration));
> > +
> > +    qemu_sem_destroy(&current_incoming->postcopy_pause_sem_fault);
> > +    qemu_sem_destroy(&current_incoming->postcopy_pause_sem_dst);
> > +    qemu_event_destroy(&current_incoming->main_thread_load_event);
> > +    qemu_mutex_destroy(&current_incoming->rp_mutex);
> > +    g_array_free(current_incoming->postcopy_remote_fds, true);

That array is already free'd in migration_incoming_state_destroy,
so I see reliable glib assert's from this array free.

Dave

> > +    g_free(current_incoming);
> >  }
> >  
> >  /* For outgoing */
> > -- 
> > 1.8.3.1
> > 
> --
> Dr. David Alan Gilbert / address@hidden / Manchester, UK
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]