summaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-04-14 21:54:33 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-04-14 21:54:33 +0000
commit8ecc6922cac67b2bee18e162cfcdc69d5938ffd5 (patch)
treeeb41c0c39ef67024d3b7ccc9f4aee0828ef2bbbf /gdb/c-lang.c
parent0ebbe3ae9e562b5039b4323e61d44df41fc915db (diff)
downloadgdb-8ecc6922cac67b2bee18e162cfcdc69d5938ffd5.tar.gz
gdb/
* c-lang.c (c_get_string): Fix xfree crash on a failed string read.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 0c9e4f8059e..e18f173ad1a 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -657,7 +657,7 @@ c_get_string (struct value *value, gdb_byte **buffer, int *length,
buffer, length);
if (err)
{
- xfree (buffer);
+ xfree (*buffer);
error (_("Error reading string from inferior: %s"),
safe_strerror (err));
}