aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index 4e970ca0db..611e997d42 100644
--- a/savevm.c
+++ b/savevm.c
@@ -419,7 +419,9 @@ int qemu_file_get_error(QEMUFile *f)
static void qemu_file_set_error(QEMUFile *f, int ret)
{
- f->last_error = ret;
+ if (f->last_error == 0) {
+ f->last_error = ret;
+ }
}
/** Flushes QEMUFile buffer