diff options
Diffstat (limited to 'util/compatfd.c')
-rw-r--r-- | util/compatfd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/util/compatfd.c b/util/compatfd.c index 174f394533..a8ec525c6c 100644 --- a/util/compatfd.c +++ b/util/compatfd.c @@ -72,14 +72,10 @@ static int qemu_signalfd_compat(const sigset_t *mask) QemuThread thread; int fds[2]; - info = malloc(sizeof(*info)); - if (info == NULL) { - errno = ENOMEM; - return -1; - } + info = g_malloc(sizeof(*info)); if (pipe(fds) == -1) { - free(info); + g_free(info); return -1; } |