From: Gary Benson <gbenson@redhat.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix badness vector resource leaks found by Coverity
Date: Wed, 10 Oct 2018 14:20:00 -0000 [thread overview]
Message-ID: <20181010142011.GA12480@blade.nx> (raw)
In-Reply-To: <ec3f7ef8-1396-1d11-9a4d-9611cebbde43@redhat.com>
Pedro Alves wrote:
> Please use some more descriptive subject in these emails/commits,
> otherwise we're going to end up with dozens of indistinct
> "Fix resource leak found by Coverity" patches/emails. :-)
Yeah, it just occurred to me to do that, after I looked in my
inbox :D
> As for the patch itself, I think that we'd still be leaking
> bv->rank, right? Not just here, but in the callers of rank_function
> as well?
Oh, I just looked in valops.c to see what other things did to
free the vectors. So there's other leaks in there as well :/
> I have a patch from last year here that converts the badness
> vector to a C++ std::vector:
>
> https://github.com/palves/gdb/commits/palves/badness_vector
>
> See top two commits.
>
> I guess a better approach would be to get that in instead.
>
> Simon had a badness_vector C++ification patch too,
> though his was different. ISTR that I prefer my approach,
> but I won't be surprised if Simon preferred his. :-)
I'll look at them. Were they ever submitted, or unfinished, or... ?
Cheers,
Gary
prev parent reply other threads:[~2018-10-10 14:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 13:53 [PATCH] Fix resource leak " Gary Benson
2018-10-10 14:11 ` Pedro Alves
2018-10-10 14:20 ` Gary Benson [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=20181010142011.GA12480@blade.nx \
--to=gbenson@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/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).