From: Tom Tromey <tromey@redhat.com>
To: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [RFA] Avoid memory leaks in set_language function.
Date: Wed, 05 Dec 2012 18:19:00 -0000 [thread overview]
Message-ID: <87obi8s6pg.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1043.9041689553$1354727529@news.gmane.org> (Pierre Muller's message of "Wed, 5 Dec 2012 18:11:13 +0100")
>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:
Pierre> This also revealed a few memory leaks
Pierre> related to repeated add_language function calls.
Wow, add_language is gross. I had no idea.
Pierre> + if (iter->doc && iter->flags & DOC_ALLOCATED)
I think parens around the second clause here.
Actually I tend to prefer the wordier
(iter->flags & DOC_ALLOCATED) != 0
Pierre> #define MALLOCED_REPLACEMENT 0x4
Pierre> -
Pierre> +#define DOC_ALLOCATED 0x8
Pierre> struct cmd_list_element
Please preserve the blank line after the block of #defines.
Ok with those changes.
Tom
next parent reply other threads:[~2012-12-05 18:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1043.9041689553$1354727529@news.gmane.org>
2012-12-05 18:19 ` Tom Tromey [this message]
2012-12-05 23:46 ` Pierre Muller
2012-12-05 17:11 Pierre Muller
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=87obi8s6pg.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/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