aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index adff42140c..392a14f79c 100644
--- a/savevm.c
+++ b/savevm.c
@@ -235,6 +235,9 @@ static int stdio_pclose(void *opaque)
QEMUFileStdio *s = opaque;
int ret;
ret = pclose(s->stdio_file);
+ if (ret == -1) {
+ ret = -errno;
+ }
g_free(s);
return ret;
}