linux-user: Fix exit syscall with QOM CPU
For QOM'ified CPUs we cannot g_free() CPUArchState, we must
object_delete() the object it is embedded into.
Fixes LP#982321 (invalid free() while executing pacman with qemu-arm).
Reported-by: Serge Schneider <[email protected]>
Reported-by: Russell Keith Davis <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Tested-by: Serge Schneider <[email protected]>
Tested-by: Russell Keith Davis <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>