From: Tom Tromey <tom@tromey.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Fix leak in most gdb.mi tests.
Date: Sun, 30 Dec 2018 23:43:00 -0000 [thread overview]
Message-ID: <87bm52lgxb.fsf@tromey.com> (raw)
In-Reply-To: <1546205040.12900.14.camel@skynet.be> (Philippe Waroquiers's message of "Sun, 30 Dec 2018 22:24:00 +0100")
>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
Philippe> The below patch does not put rl inside a gdb::unique_xmalloc_ptr<char>,
Philippe> as rl is allocated locally, is then passed as a 'const char*'
Philippe> and then xfree-d in the same block.
Philippe> Ok to push ?
Philippe> Or would it still be better to have a local gdb::unique_xmalloc_ptr<char> ?
I think it's better to use a unique_xmalloc_ptr, in case something can
throw, either now or in the future.
Tom
prev parent reply other threads:[~2018-12-30 23:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-29 17:01 Philippe Waroquiers
2018-12-29 19:15 ` Tom Tromey
2018-12-29 19:33 ` Tom Tromey
2018-12-29 19:44 ` Tom Tromey
2018-12-30 9:28 ` Philippe Waroquiers
2018-12-30 15:55 ` Tom Tromey
2018-12-30 21:24 ` Philippe Waroquiers
2018-12-30 23:43 ` Tom Tromey [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=87bm52lgxb.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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