All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Ryan Cai <ryancaicse@gmail.com>
Cc: dgdegra@tycho.nsa.gov,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [BUG] Resource leaks in Xen
Date: Wed, 22 Dec 2021 10:28:10 +0100	[thread overview]
Message-ID: <afe6bc04-c87b-e627-d032-b205a6bcfe7e@suse.com> (raw)
In-Reply-To: <62B51AB1-2C2B-402A-A7C8-5ADACE265DA4@gmail.com>

On 22.12.2021 09:05, Ryan Cai wrote:
>              I am writing you to report potential resource leak bugs. In the file /xen/tools/flask/utils/label-pci.c, the methods fopen and fclose may not matched when returning at Line 76, resulting in a resource leak. Looking forward to your feedback. Thank for checking.
> 
> Locations, https://github.com/xen-project/xen/blame/25849c8b16f2a5b7fcd0a823e80a5f1b590291f9/tools/flask/utils/label-pci.c#L63-L76

Thanks for looking closely, but I'm afraid I don't see where any
resources get leaked here: "f" will get closed implicitly after
returning from main(). It might be good practice to close files
explicitly, but that's purely cosmetic here afaics. Feel free to
contribute a patch.

Jan



  reply	other threads:[~2021-12-22  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22  8:05 [BUG] Resource leaks in Xen Ryan Cai
2021-12-22  9:28 ` Jan Beulich [this message]
2021-12-22 11:14   ` Ryan Cai

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=afe6bc04-c87b-e627-d032-b205a6bcfe7e@suse.com \
    --to=jbeulich@suse.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ryancaicse@gmail.com \
    --cc=xen-devel@lists.xenproject.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.