Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Markus Metzger <markus.t.metzger@intel.com>
Cc: palves@redhat.com, gdb-patches@sourceware.org
Subject: Re: [PATCH v2 1/3] make_corefile_notes: have caller free returned memory
Date: Tue, 24 Jun 2014 13:44:00 -0000	[thread overview]
Message-ID: <87ionq4e2l.fsf@fleche.redhat.com> (raw)
In-Reply-To: <1403599872-25299-1-git-send-email-markus.t.metzger@intel.com>	(Markus Metzger's message of "Tue, 24 Jun 2014 10:51:10 +0200")

>>>>> "Markus" == Markus Metzger <markus.t.metzger@intel.com> writes:

Markus>    if (note_data == NULL || note_size == 0)
Markus>      error (_("Target does not support core file generation."));
 
Markus> +  cleanup = make_cleanup (xfree, note_data);

I wonder if it is possible for note_data!=NULL but note_size==0.

If it is possible, then the cleanup ought to be moved earlier.
(FWIW it's ok to have an xfree cleanup with a NULL argument.)

Or if it is not possible, then I suppose the code just above is in
error... not your problem but if you happen to know, I would like to fix
it up.

thanks,
Tom


  parent reply	other threads:[~2014-06-24 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24  8:51 Markus Metzger
2014-06-24  8:51 ` [PATCH v2 2/3] gcore, target: allow target to prepare/cleanup for/after core file generation Markus Metzger
2014-06-24 13:11   ` Pedro Alves
2014-06-24  8:52 ` [PATCH v2 3/3] btrace: pretend we're not replaying when generating a core file Markus Metzger
2014-06-24 13:19   ` Pedro Alves
2014-06-24 12:58 ` [PATCH v2 1/3] make_corefile_notes: have caller free returned memory Pedro Alves
2014-06-24 13:44 ` Tom Tromey [this message]
2014-06-24 14:18   ` Metzger, Markus T

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=87ionq4e2l.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    --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