Message ID | 1495176212-14446-4-git-send-email-peterx@redhat.com |
---|---|
State | New |
Headers | show |
Peter Xu <peterx@redhat.com> wrote: > The return path channel is possibly leaked. Fix it. > > Signed-off-by: Peter Xu <peterx@redhat.com> > --- > migration/migration.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/migration/migration.c b/migration/migration.c > index e4f4c8c..92617fc 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -130,6 +130,11 @@ void migration_incoming_state_destroy(void) > { > struct MigrationIncomingState *mis = migration_incoming_get_current(); > > + if (mis->to_src_file) { > + qemu_fclose(mis->to_src_file); > + mis->to_src_file = NULL; > + } > + > qemu_event_destroy(&mis->main_thread_load_event); > loadvm_free_handlers(mis); > } Reviewed-by: Juan Quintela <quintela@redhat.com>
Peter Xu <peterx@redhat.com> wrote: > The return path channel is possibly leaked. Fix it. > > Signed-off-by: Peter Xu <peterx@redhat.com> > --- > migration/migration.c | 5 +++++ > 1 file changed, 5 insertions(+) > Queued this one. Reviewed-by: Juan Quintela <quintela@redhat.com> > diff --git a/migration/migration.c b/migration/migration.c > index e4f4c8c..92617fc 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -130,6 +130,11 @@ void migration_incoming_state_destroy(void) > { > struct MigrationIncomingState *mis = migration_incoming_get_current(); > > + if (mis->to_src_file) { > + qemu_fclose(mis->to_src_file); > + mis->to_src_file = NULL; > + } > + > qemu_event_destroy(&mis->main_thread_load_event); > loadvm_free_handlers(mis); > }
diff --git a/migration/migration.c b/migration/migration.c index e4f4c8c..92617fc 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -130,6 +130,11 @@ void migration_incoming_state_destroy(void) { struct MigrationIncomingState *mis = migration_incoming_get_current(); + if (mis->to_src_file) { + qemu_fclose(mis->to_src_file); + mis->to_src_file = NULL; + } + qemu_event_destroy(&mis->main_thread_load_event); loadvm_free_handlers(mis); }
The return path channel is possibly leaked. Fix it. Signed-off-by: Peter Xu <peterx@redhat.com> --- migration/migration.c | 5 +++++ 1 file changed, 5 insertions(+)