diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2020-03-24 18:36:28 +0300 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2020-06-22 12:52:16 -0500 |
commit | 09397e965739bd7da25bf1739a89fe2f245e8446 (patch) | |
tree | 837192ade96ef114e3451eb533d7b80301c4f699 /migration | |
parent | 674d3822250a8830fb8e9720ce499f2e8cef6a88 (diff) | |
download | qemu-09397e965739bd7da25bf1739a89fe2f245e8446.zip qemu-09397e965739bd7da25bf1739a89fe2f245e8446.tar.gz qemu-09397e965739bd7da25bf1739a89fe2f245e8446.tar.bz2 |
migration/colo: fix use after free of local_err
local_err is used again in secondary_vm_do_failover() after
replication_stop_all(), so we must zero it. Otherwise try to set
non-NULL local_err will crash.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20200324153630.11882-5-vsementsov@virtuozzo.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
(cherry picked from commit 27d07fcfa70c3afa0664288cbce5334ed9595a3a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/colo.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/colo.c b/migration/colo.c index 2c88aa5..6d46800 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -92,6 +92,7 @@ static void secondary_vm_do_failover(void) replication_stop_all(true, &local_err); if (local_err) { error_report_err(local_err); + local_err = NULL; } /* Notify all filters of all NIC to do checkpoint */ |