aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-11-07 22:25:16 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-11-07 22:25:16 +0000
commit803b5f9525d4082320ebae560ef4168a0f342cc4 (patch)
treedbcfce35e1a98e8901519e695e6c92a6ab173f9c /gdb/infrun.c
parent91cd6f4fcf90c4a153b95eeb8c2e6e7b5a4a00cf (diff)
downloadgdb-803b5f9525d4082320ebae560ef4168a0f342cc4.zip
gdb-803b5f9525d4082320ebae560ef4168a0f342cc4.tar.gz
gdb-803b5f9525d4082320ebae560ef4168a0f342cc4.tar.bz2
gdb/
* infrun.c (restore_inferior_thread_state): Use discard_inferior_thread_state to free the data. (discard_inferior_thread_state): xfree also siginfo_data.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 240cd95..f6b00da 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -6128,9 +6128,8 @@ restore_inferior_thread_state (struct inferior_thread_state *inf_state)
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 @@ void
discard_inferior_thread_state (struct inferior_thread_state *inf_state)
{
regcache_xfree (inf_state->registers);
+ xfree (inf_state->siginfo_data);
xfree (inf_state);
}