* c-lang.c (c_get_string): Fix xfree crash on a failed string read.
This commit is contained in:
Jan Kratochvil 2009-04-14 21:54:33 +00:00
parent 88c15c3400
commit 8ea5dfdf09
2 changed files with 5 additions and 1 deletions

View file

@ -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));
}