qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

migration/ram: fix use after free of local_err

local_err is used again in migration_bitmap_sync_precopy() after
precopy_notify(), 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-6-vsementsov@virtuozzo.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

authored by

Vladimir Sementsov-Ogievskiy and committed by
Dr. David Alan Gilbert
b4a1733c 27d07fcf

+1
+1
migration/ram.c
··· 980 980 */ 981 981 if (precopy_notify(PRECOPY_NOTIFY_BEFORE_BITMAP_SYNC, &local_err)) { 982 982 error_report_err(local_err); 983 + local_err = NULL; 983 984 } 984 985 985 986 migration_bitmap_sync(rs);