Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Maxim Grigoriev <maxim@tensilica.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] xtensa-tdep.c ARI fixes
Date: Fri, 15 Apr 2011 01:07:00 -0000	[thread overview]
Message-ID: <4DA79A59.5030802@tensilica.com> (raw)
In-Reply-To: <m34o60fuc2.fsf@fleche.redhat.com>

Thanks for noticing this. xfree () is necessary here.

-- Maxim

On 04/14/2011 01:31 PM, Tom Tromey wrote:
>>>>>> "Pierre" == Pierre Muller<pierre.muller@ics-cnrs.unistra.fr>  writes:
>>>>>>              
> Pierre>    The only non-trivial change is in xtensa_register_type:
> Pierre>  this is mainly because I do not understand the old code:
> Pierre>  it was using both xmalloc and strdup, which should
> Pierre>  create a memory leak, no?
> Pierre>    But maybe I miss something?
>
> I agree.
>
> Pierre>  -		  char *name = xmalloc (16);
> Pierre>  +		  char *name = xstrprintf ("int%d", size * 8);
>
> Looks better.
>
> Pierre>  +		    = arch_integer_type (gdbarch, size * 8, 1, name);
>
> arch_integer_type calls arch_type, which calls xstrdup(name).
> So I think you need to xfree name here.
>
> Tom
>    


  reply	other threads:[~2011-04-15  1:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <15837.6740910628$1302342165@news.gmane.org>
2011-04-14 20:31 ` Tom Tromey
2011-04-15  1:07   ` Maxim Grigoriev [this message]
2011-04-15  7:40   ` [RFA-v2] " Pierre Muller
     [not found]   ` <37948.3434990563$1302853234@news.gmane.org>
2011-04-15 18:22     ` Tom Tromey
2011-04-15 18:37       ` Maxim Grigoriev
2011-04-16 16:07         ` Pierre Muller
     [not found]         ` <31380.6117898368$1302970085@news.gmane.org>
2011-04-18 17:07           ` Tom Tromey
2011-04-19  7:18             ` Pierre Muller
2011-04-09  9:42 [RFA] " 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=4DA79A59.5030802@tensilica.com \
    --to=maxim@tensilica.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    --cc=tromey@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