mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-05 21:50:21 +08:00
gdb/
* c-lang.c (c_get_string): Fix xfree crash on a failed string read.
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user