Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Tom Tromey'" <tromey@redhat.com>
Cc: "'Pedro Alves'" <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: RE: [RFA] Fix other memory leak in solib_target_current_sos
Date: Fri, 14 Dec 2012 23:29:00 -0000	[thread overview]
Message-ID: <003201cdda52$b4883050$1d9890f0$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <87hano3em7.fsf@fleche.redhat.com>

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : vendredi 14 décembre 2012 15:14
> À : Pierre Muller
> Cc : 'Pedro Alves'; gdb-patches@sourceware.org
> Objet : Re: [RFA] Fix other memory leak in solib_target_current_sos
> 
> >>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
writes:
> 
> Pierre>    library_list = solib_target_parse_libraries (library_document);
> Pierre>    if (library_list == NULL)
> Pierre> -    return NULL;
> Pierre> +    {
> Pierre> +      xfree (library_document);
> Pierre> +      return NULL;
> Pierre> +    }
> 
> It seems to me that you could unconditionally free it here, before the if.

  That's what the committed version does
thanks to Pedro's suggestion....

Pierre


      reply	other threads:[~2012-12-14 23:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50c9b7e6.25f2440a.3810.3771SMTPIN_ADDED_BROKEN@mx.google.com>
2012-12-13 20:16 ` [RFA] Fix memory leak in windows_xfer_shared_libraries Pedro Alves
2012-12-14  7:53   ` Pierre Muller
2012-12-14 10:12     ` Pedro Alves
2012-12-14 10:26       ` [RFA] Fix other memory leak in solib_target_current_sos Pierre Muller
2012-12-14 10:55         ` Pedro Alves
2012-12-14 13:07           ` [RFA-v2] " Pierre Muller
2012-12-14 13:49             ` Pedro Alves
     [not found]       ` <43198.6185875305$1355480794@news.gmane.org>
2012-12-14 14:14         ` [RFA] " Tom Tromey
2012-12-14 23:29           ` Pierre Muller [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='003201cdda52$b4883050$1d9890f0$@muller@ics-cnrs.unistra.fr' \
    --to=pierre.muller@ics-cnrs.unistra.fr \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --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