From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Jeff Cody <jcody@redhat.com>
Cc: qemu-trivial@nongnu.org, pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write()
Date: Thu, 15 Mar 2012 13:39:04 -0500 [thread overview]
Message-ID: <20120315183904.GL2894@illuin> (raw)
In-Reply-To: <dc308d51a38be11f3de7dbc3f66e4716f8b559b3.1331835902.git.jcody@redhat.com>
On Thu, Mar 15, 2012 at 02:26:18PM -0400, Jeff Cody wrote:
> In the function ga_channel_write(), the handle ov.hEvent is created
> by the call to CreateEvent(). However, the handle is not closed
> prior to the function return.
>
> This patch closes the handle before the return of the function.
>
> Kudos to Paolo Bonzini for spotting this bug.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
> qga/channel-win32.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/qga/channel-win32.c b/qga/channel-win32.c
> index 190251b..16bf44a 100644
> --- a/qga/channel-win32.c
> +++ b/qga/channel-win32.c
> @@ -259,6 +259,10 @@ static GIOStatus ga_channel_write(GAChannel *c, const char *buf, size_t size,
> *count = written;
> }
>
> + if (ov.hEvent) {
> + CloseHandle(ov.hEvent);
> + ov.hEvent = NULL;
> + }
> return status;
> }
>
> --
> 1.7.9.rc2.1.g69204
>
WARNING: multiple messages have this Message-ID (diff)
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Jeff Cody <jcody@redhat.com>
Cc: qemu-trivial@nongnu.org, pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write()
Date: Thu, 15 Mar 2012 13:39:04 -0500 [thread overview]
Message-ID: <20120315183904.GL2894@illuin> (raw)
In-Reply-To: <dc308d51a38be11f3de7dbc3f66e4716f8b559b3.1331835902.git.jcody@redhat.com>
On Thu, Mar 15, 2012 at 02:26:18PM -0400, Jeff Cody wrote:
> In the function ga_channel_write(), the handle ov.hEvent is created
> by the call to CreateEvent(). However, the handle is not closed
> prior to the function return.
>
> This patch closes the handle before the return of the function.
>
> Kudos to Paolo Bonzini for spotting this bug.
>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
> qga/channel-win32.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/qga/channel-win32.c b/qga/channel-win32.c
> index 190251b..16bf44a 100644
> --- a/qga/channel-win32.c
> +++ b/qga/channel-win32.c
> @@ -259,6 +259,10 @@ static GIOStatus ga_channel_write(GAChannel *c, const char *buf, size_t size,
> *count = written;
> }
>
> + if (ov.hEvent) {
> + CloseHandle(ov.hEvent);
> + ov.hEvent = NULL;
> + }
> return status;
> }
>
> --
> 1.7.9.rc2.1.g69204
>
next prev parent reply other threads:[~2012-03-15 18:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 18:26 [Qemu-trivial] [PATCH] qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write() Jeff Cody
2012-03-15 18:26 ` [Qemu-devel] " Jeff Cody
2012-03-15 18:39 ` Michael Roth [this message]
2012-03-15 18:39 ` Michael Roth
2012-03-19 11:00 ` [Qemu-trivial] " Stefan Hajnoczi
2012-03-19 11:00 ` Stefan Hajnoczi
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=20120315183904.GL2894@illuin \
--to=mdroth@linux.vnet.ibm.com \
--cc=jcody@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.