public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Sylvestre Ledru <sylvestre@debian.org>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] lto-wrapper.c (copy_file): Fix resource leaks
Date: Mon, 26 Jun 2017 15:22:00 -0000	[thread overview]
Message-ID: <39205963-c810-9c2e-5830-f0ac08af9de1@redhat.com> (raw)
In-Reply-To: <20170626135809.GI2123@tucnak>

On 06/26/2017 07:58 AM, Jakub Jelinek wrote:
> On Mon, May 15, 2017 at 03:58:29PM -0600, Jeff Law wrote:
>> On 05/14/2017 04:00 AM, Sylvestre Ledru wrote:
>>> Add missing fclose
>>> CID 1407987, 1407986
>>>
>>> S
>>>
>>>
>>>
>>> 0005-2017-05-14-Sylvestre-Ledru-sylvestre-debian.org.patch
>>>
>>>
>>>  From d255827a64012fb81937d6baa8534eabecf9b735 Mon Sep 17 00:00:00 2001
>>> From: Sylvestre Ledru<sylvestre@debian.org>
>>> Date: Sun, 14 May 2017 11:37:37 +0200
>>> Subject: [PATCH 5/5] 2017-05-14  Sylvestre Ledru<sylvestre@debian.org>
>>>
>>> 	* lto-wrapper.c (copy_file): Fix resource leaks
>>>            CID 1407987, 1407986
>> Doesn't this still leak in the cases were we call fatal_error?
> 
> fatal_error is a noreturn function, why should we bother to do any cleanups
> after it?  All that code is going to be optimized away anyway.
But cleaning this kind of thing up does help static analyzers and such.
 ISTM that we'd need a compelling reason _not_ to accept this kind of patch.

jeff

  reply	other threads:[~2017-06-26 15:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-14 10:23 Sylvestre Ledru
2017-05-15 21:59 ` Jeff Law
2017-05-16  8:02   ` Sylvestre Ledru
2017-06-26 13:24     ` Sylvestre Ledru
2017-06-26 13:58   ` Jakub Jelinek
2017-06-26 15:22     ` Jeff Law [this message]
2017-06-26 15:26       ` Jakub Jelinek
2017-06-29 23:30         ` Jeff Law

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=39205963-c810-9c2e-5830-f0ac08af9de1@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=sylvestre@debian.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 read-only IMAP folder(s) and NNTP newsgroup(s).