Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_slirp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_slirp.c b/src/qemu/qemu_slirp.c
index 3efc34bcf0..d9105b0ff6 100644
--- a/src/qemu/qemu_slirp.c
+++ b/src/qemu/qemu_slirp.c
@@ -81,10 +81,9 @@ qemuSlirpHasFeature(const qemuSlirp *slirp,
qemuSlirpPtr
qemuSlirpNew(void)
{
- g_autoptr(qemuSlirp) slirp = NULL;
+ g_autoptr(qemuSlirp) slirp = g_new0(qemuSlirp, 1);
- if (VIR_ALLOC(slirp) < 0 ||
- !(slirp->features = virBitmapNew(QEMU_SLIRP_FEATURE_LAST)))
+ if (!(slirp->features = virBitmapNew(QEMU_SLIRP_FEATURE_LAST)))
return NULL;
slirp->pid = (pid_t)-1;
--
2.26.2