aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/savevm.c b/savevm.c
index 392a14f79c..b72f6c0d17 100644
--- a/savevm.c
+++ b/savevm.c
@@ -245,9 +245,12 @@ static int stdio_pclose(void *opaque)
static int stdio_fclose(void *opaque)
{
QEMUFileStdio *s = opaque;
- fclose(s->stdio_file);
+ int ret = 0;
+ if (fclose(s->stdio_file) == EOF) {
+ ret = -errno;
+ }
g_free(s);
- return 0;
+ return ret;
}
QEMUFile *qemu_popen(FILE *stdio_file, const char *mode)