diff options
Diffstat (limited to 'net/slirp.c')
-rw-r--r-- | net/slirp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/slirp.c b/net/slirp.c index 377d7ef8c0..0cbca3cc83 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -652,7 +652,7 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str, return -1; } } else { - fwd = g_malloc(sizeof(struct GuestFwd)); + fwd = g_new(struct GuestFwd, 1); fwd->hd = qemu_chr_new(buf, p, NULL); if (!fwd->hd) { error_report("could not open guest forwarding device '%s'", buf); |