From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: Pedro Alves <pedro@codesourcery.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
"drow@false.org" <drow@false.org>
Subject: [commit] Compilation regression [Re: [RFA] Fix memory leak in gdbserver/hostio.c]
Date: Mon, 28 Feb 2011 04:39:00 -0000 [thread overview]
Message-ID: <20110228042252.GA12861@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <4D6AC713.10800@vmware.com>
On Sun, 27 Feb 2011 22:50:11 +0100, Michael Snyder wrote:
> 2011-02-27 Michael Snyder <msnyder@vmware.com>
>
> * hostio.c (require_data): Free malloc memory before returning
> error.
>
> --- hostio.c 1 Jan 2011 15:33:24 -0000 1.11
> +++ hostio.c 27 Feb 2011 21:48:00 -0000
> @@ -134,7 +134,10 @@ require_data (char *p, int p_len, char *
> + xfree (data);
= http://sourceware.org/ml/gdb-cvs/2011-02/msg00220.html
hostio.c: In function ‘require_data’:
hostio.c:138:7: error: implicit declaration of function ‘xfree’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make: *** [hostio.o] Error 1
It could not build as -Werror is there by default, could it?
Checked in the fix.
Regards,
Jan
http://sourceware.org/ml/gdb-cvs/2011-02/msg00227.html
--- src/gdb/gdbserver/ChangeLog 2011/02/28 01:46:50 1.459
+++ src/gdb/gdbserver/ChangeLog 2011/02/28 04:20:29 1.460
@@ -1,3 +1,7 @@
+2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * hostio.c (require_data): Use free, not xfree.
+
2011-02-27 Michael Snyder <msnyder@vmware.com>
* server.c (handle_query): Discard unused value.
--- src/gdb/gdbserver/hostio.c 2011/02/27 23:32:04 1.12
+++ src/gdb/gdbserver/hostio.c 2011/02/28 04:20:30 1.13
@@ -135,7 +135,7 @@
if (escaped)
{
- xfree (data);
+ free (data);
return -1;
}
next prev parent reply other threads:[~2011-02-28 4:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-27 0:40 [RFA] Fix memory leak in gdbserver/hostio.c Michael Snyder
2011-02-27 17:10 ` Pedro Alves
2011-02-27 21:57 ` Michael Snyder
2011-02-27 23:29 ` Pedro Alves
2011-02-28 4:39 ` Jan Kratochvil [this message]
2011-02-28 16:00 ` [commit] Compilation regression [Re: [RFA] Fix memory leak in gdbserver/hostio.c] Ulrich Weigand
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=20110228042252.GA12861@host1.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.com \
--cc=pedro@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