From: Simon Marchi <simon.marchi@polymtl.ca>
To: "Alexandra Hájková" <alexandra.khirnova@gmail.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] inflow.c: Do not leak tty.
Date: Fri, 14 May 2021 09:22:40 -0400 [thread overview]
Message-ID: <851fc6dd-fb47-c7be-e33b-2dbcfdd72f58@polymtl.ca> (raw)
In-Reply-To: <20210514113308.3500211-1-ahajkova@redhat.com>
On 2021-05-14 7:33 a.m., Alexandra Hájková via Gdb-patches wrote:
> From: Alexandra Hájková <ahajkova@redhat.com>
>
> In a case open() returns 0 tty might be leaked. While 0 should be
> stdin (and therefore is an unlikely return value from open()), it's
> still the case that the test should be for non-negative return values
> from open().
That indeed looks like a little brain fart from when the code was
written, the patch LGTM.
Simon
prev parent reply other threads:[~2021-05-14 13:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 11:33 Alexandra Hájková
2021-05-14 13:22 ` Simon Marchi [this message]
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=851fc6dd-fb47-c7be-e33b-2dbcfdd72f58@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=alexandra.khirnova@gmail.com \
--cc=gdb-patches@sourceware.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).