From: Jan Kratochvil Date: Tue, 14 Apr 2009 21:54:33 +0000 (+0000) Subject: gdb/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ea5dfdf09ef031b83a6a04376cfb2361bac8aa3;p=binutils-gdb.git gdb/ * c-lang.c (c_get_string): Fix xfree crash on a failed string read. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 59c74704132..f721d4a8376 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2009-04-14 Jan Kratochvil + + * c-lang.c (c_get_string): Fix xfree crash on a failed string read. + 2009-04-14 Pierre Muller ARI fix: sprintf rule. 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)); }