From: Pan Nengyuan <[email protected]> 'local_err' forgot to free in colo_process_incoming_thread error path. Fix that.
Reported-by: Euler Robot <[email protected]> Signed-off-by: Pan Nengyuan <[email protected]> Reviewed-by: Li Qiang <[email protected]> Signed-off-by: Chen Qun <[email protected]> --- Cc: Hailiang Zhang <[email protected]> Cc: Juan Quintela <[email protected]> Cc: "Dr. David Alan Gilbert" <[email protected]> --- migration/colo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migration/colo.c b/migration/colo.c index 3f1d3dfd95..7cc5a37192 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -886,7 +886,6 @@ void *colo_process_incoming_thread(void *opaque) while (mis->state == MIGRATION_STATUS_COLO) { colo_wait_handle_message(mis, fb, bioc, &local_err); if (local_err) { - error_report_err(local_err); break; } @@ -922,6 +921,10 @@ out: qemu_fclose(fb); } + if (local_err) { + error_report_err(local_err); + } + /* Hope this not to be too long to loop here */ qemu_sem_wait(&mis->colo_incoming_sem); qemu_sem_destroy(&mis->colo_incoming_sem); -- 2.23.0
