Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migration: don't close a file descriptor while it can be in use
If we close the QEMUFile descriptor in process_incoming_migration_co() while it has been stopped by an error, the postcopy_ram_listen_thread() can try to continue to use it. And as the memory has been freed it is working with an invalid pointer and crashes. Fix this by releasing the memory after having managed the error case (which, in fact, calls exit()) Signed-off-by: Laurent Vivier <[email protected]> Reviewed-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Reviewed-by: Amit Shah <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
- Loading branch information