qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH] qemu-sockets: use qapi_free_SocketAddress in cleanup
Date: Wed, 6 Jul 2016 14:18:16 -0600	[thread overview]
Message-ID: <577D6788.4050200@redhat.com> (raw)
In-Reply-To: <20160706164246.22116-1-marcandre.lureau@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

On 07/06/2016 10:42 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Commit 74b6ce43e3 uses the wrong free API for a SocketAddress, that
> may leak some linked data.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  util/qemu-sockets.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>


> 
> diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
> index fb83d48..777af49 100644
> --- a/util/qemu-sockets.c
> +++ b/util/qemu-sockets.c
> @@ -1012,7 +1012,7 @@ void socket_listen_cleanup(int fd, Error **errp)
>          }
>      }
>  
> -    g_free(addr);
> +    qapi_free_SocketAddress(addr);
>  }
>  
>  int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-07-06 20:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 16:42 [Qemu-devel] [PATCH] qemu-sockets: use qapi_free_SocketAddress in cleanup marcandre.lureau
2016-07-06 20:18 ` Eric Blake [this message]
2016-07-08  8:15 ` Shannon Zhao
2016-07-08 14:03 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577D6788.4050200@redhat.com \
    --to=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).