diff options
author | Michael Snyder <msnyder@specifix.com> | 2007-08-17 23:27:42 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2007-08-17 23:27:42 +0000 |
commit | 56cc4a01b2971f3f2b26e197388b146c19dc7592 (patch) | |
tree | d27ca01f7d2615601e84d73af24e372f23960bcb | |
parent | 04c2fcba3a6ed031521e987e79e00af5ab2b0dbf (diff) | |
download | gdb-56cc4a01b2971f3f2b26e197388b146c19dc7592.tar.gz |
2007-08-17 Michael Snyder <msnyder@access-company.com>
* c-exp.y (parse_number): Memory leak.
-rw-r--r-- | gdb/ChangeLog | 2 | ||||
-rw-r--r-- | gdb/c-exp.y | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3bc24acd93b..0bd7c85a535 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-08-17 Michael Snyder <msnyder@access-company.com> + * c-exp.y (parse_number): Memory leak. + * completer.c (location_completer): Must free 'fn_list', except in the one case where it is returned (as 'list'). diff --git a/gdb/c-exp.y b/gdb/c-exp.y index b67c7e1a8db..6318955b038 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1096,9 +1096,13 @@ parse_number (p, len, parsed_float, putithere) putithere->typed_val_float.type = builtin_type (current_gdbarch)->builtin_long_double; else - return ERROR; + { + free (s); + return ERROR; + } } + free (s); return FLOAT; } |