From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Stan Shebs <stan@codesourcery.com>
Subject: Re: [PATCH/commit] Handle errors in tracepoint target agent
Date: Fri, 26 Mar 2010 11:40:00 -0000 [thread overview]
Message-ID: <201003261140.09071.pedro@codesourcery.com> (raw)
In-Reply-To: <4BAC1426.5050003@codesourcery.com>
On Friday 26 March 2010 01:55:50, Stan Shebs wrote:
> The error message is never NULL, I added the MI
> status bit overlooked before,
But now, `error_desc' is leaking in the case you xmalloc it.
When you fix that leak, you'll stumble of the fact that
in some cases you have this:
ts->error_desc = ""
while in others you have this:
ts->error_desc = (char *) xmalloc (p2 - p1 + 1);
How can you reliably know if you may xfree
ts->error_desc that way? xfree ("") is a no go.
Comparing a pointer with "" is also not good.
--
Pedro Alves
next prev parent reply other threads:[~2010-03-26 11:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 1:56 Stan Shebs
2010-03-26 11:13 ` Pedro Alves
2010-03-26 12:40 ` Stan Shebs
2010-03-26 13:38 ` Pedro Alves
2010-03-26 14:17 ` Pedro Alves
2010-03-26 11:40 ` Pedro Alves [this message]
2010-03-26 12:50 ` Stan Shebs
2010-03-26 14:44 ` Pedro Alves
2010-03-26 15:20 ` Stan Shebs
2010-03-26 15:28 ` Eli Zaretskii
2010-03-26 15:53 ` Daniel Jacobowitz
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=201003261140.09071.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=stan@codesourcery.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