aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qemu-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-file.c b/qemu-file.c
index c303b61373..9cb12239e5 100644
--- a/qemu-file.c
+++ b/qemu-file.c
@@ -175,7 +175,7 @@ static int stdio_fclose(void *opaque)
QEMUFileStdio *s = opaque;
int ret = 0;
- if (s->file->ops->put_buffer || s->file->ops->writev_buffer) {
+ if (qemu_file_is_writable(s->file)) {
int fd = fileno(s->stdio_file);
struct stat st;