qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/27] net/slirp: fix leaks on forwaring rule re


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 04/27] net/slirp: fix leaks on forwaring rule registration error
Date: Thu, 17 Jan 2019 11:50:41 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

On 1/17/19 5:43 AM, Marc-André Lureau wrote:

In the subject: s/forwaring/forwarding/

> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  net/slirp.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/slirp.c b/net/slirp.c
> index 750105a466e..0b15f427f5c 100644
> --- a/net/slirp.c
> +++ b/net/slirp.c
> @@ -807,6 +807,7 @@ static int slirp_guestfwd(SlirpState *s, const char 
> *config_str, Error **errp)
>          qemu_chr_fe_init(&fwd->hd, chr, &err);
>          if (err) {
>              error_propagate(errp, err);
> +            object_unparent(OBJECT(chr));
>              g_free(fwd);
>              return -1;
>          }
> @@ -815,6 +816,7 @@ static int slirp_guestfwd(SlirpState *s, const char 
> *config_str, Error **errp)
>                                 &server, port) < 0) {
>              error_setg(errp, "Conflicting/invalid host:port in guest "
>                         "forwarding rule '%s'", config_str);
> +            qemu_chr_fe_deinit(&fwd->hd, true);
>              g_free(fwd);
>              return -1;
>          }
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]