aboutsummaryrefslogtreecommitdiff
path: root/migration/qemu-file-stdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration/qemu-file-stdio.c')
-rw-r--r--migration/qemu-file-stdio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/qemu-file-stdio.c b/migration/qemu-file-stdio.c
index dc91137b9c..889ffb302c 100644
--- a/migration/qemu-file-stdio.c
+++ b/migration/qemu-file-stdio.c
@@ -144,7 +144,7 @@ QEMUFile *qemu_popen_cmd(const char *command, const char *mode)
return NULL;
}
- s = g_malloc0(sizeof(QEMUFileStdio));
+ s = g_new0(QEMUFileStdio, 1);
s->stdio_file = stdio_file;
@@ -176,7 +176,7 @@ QEMUFile *qemu_fopen(const char *filename, const char *mode)
return NULL;
}
- s = g_malloc0(sizeof(QEMUFileStdio));
+ s = g_new0(QEMUFileStdio, 1);
s->stdio_file = fopen(filename, mode);
if (!s->stdio_file) {