Message ID | 20160706164246.22116-1-marcandre.lureau@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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) >
On 2016/7/7 0:42, 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> I'm planing to send a patch, then I find this :) Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org> > --- > util/qemu-sockets.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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) >
On 06/07/2016 18:42, 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(-) > > 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) > Queued, thanks. Paolo
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)