From: "Daniel P. Berrange" <berrange@redhat.com>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] 9pfs: fix fd leak in local_opendir()
Date: Fri, 3 Mar 2017 17:54:54 +0000 [thread overview]
Message-ID: <20170303175454.GN13631@redhat.com> (raw)
In-Reply-To: <148856356236.7604.4296371092878661257.stgit@bahia.lan>
On Fri, Mar 03, 2017 at 06:52:42PM +0100, Greg Kurz wrote:
> Coverity issue CID1371731
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> hw/9pfs/9p-local.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
> index e31309a29c58..fe930300445a 100644
> --- a/hw/9pfs/9p-local.c
> +++ b/hw/9pfs/9p-local.c
> @@ -435,6 +435,7 @@ static int local_opendir(FsContext *ctx,
>
> stream = fdopendir(dirfd);
> if (!stream) {
> + close(dirfd);
> return -1;
> }
> fs->dir.stream = stream;
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
next prev parent reply other threads:[~2017-03-03 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 17:52 [Qemu-devel] [PATCH] 9pfs: fix fd leak in local_opendir() Greg Kurz
2017-03-03 17:54 ` Daniel P. Berrange [this message]
2017-03-03 20:01 ` Philippe Mathieu-Daudé
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=20170303175454.GN13631@redhat.com \
--to=berrange@redhat.com \
--cc=groug@kaod.org \
--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 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.