* [obv] Fix infcall small memory leak
@ 2010-11-07 22:26 Jan Kratochvil
0 siblings, 0 replies; only message in thread
From: Jan Kratochvil @ 2010-11-07 22:26 UTC (permalink / raw)
To: gdb-patches
Hi,
discard_inferior_thread_state was not updated by me before for the new field
siginfo_data.
No regressions on {x86_64,x86_64-m32,i686}-fedora14snapshot-linux-gnu.
Checked-in.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2010-11/msg00037.html
--- src/gdb/ChangeLog 2010/11/05 16:55:33 1.12300
+++ src/gdb/ChangeLog 2010/11/07 22:25:15 1.12301
@@ -1,3 +1,9 @@
+2010-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * infrun.c (restore_inferior_thread_state): Use
+ discard_inferior_thread_state to free the data.
+ (discard_inferior_thread_state): xfree also siginfo_data.
+
2010-11-05 Doug Evans <dje@google.com>
Make gdb.parameter("directories") work.
--- src/gdb/infrun.c 2010/11/02 01:37:31 1.454
+++ src/gdb/infrun.c 2010/11/07 22:25:16 1.455
@@ -6128,9 +6128,8 @@
if (target_has_execution)
/* NB: The register write goes through to the target. */
regcache_cpy (regcache, inf_state->registers);
- regcache_xfree (inf_state->registers);
- xfree (inf_state->siginfo_data);
- xfree (inf_state);
+
+ discard_inferior_thread_state (inf_state);
}
static void
@@ -6149,6 +6148,7 @@
discard_inferior_thread_state (struct inferior_thread_state *inf_state)
{
regcache_xfree (inf_state->registers);
+ xfree (inf_state->siginfo_data);
xfree (inf_state);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-07 22:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-07 22:26 [obv] Fix infcall small memory leak Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).