aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-08-17 23:27:42 +0000
committerMichael Snyder <msnyder@vmware.com>2007-08-17 23:27:42 +0000
commit348038cd50c18e4017d553abd4925a4c9b1ec9c7 (patch)
tree831553363ed2024fdcf882561125fc7cead7872c /gdb
parent1f20ed9160677637385a3205c8acd3384ab1cee2 (diff)
downloadfsf-binutils-gdb-348038cd50c18e4017d553abd4925a4c9b1ec9c7.zip
fsf-binutils-gdb-348038cd50c18e4017d553abd4925a4c9b1ec9c7.tar.gz
fsf-binutils-gdb-348038cd50c18e4017d553abd4925a4c9b1ec9c7.tar.bz2
2007-08-17 Michael Snyder <msnyder@access-company.com>
* c-exp.y (parse_number): Memory leak.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog2
-rw-r--r--gdb/c-exp.y6
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3bc24ac..0bd7c85 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 b67c7e1..6318955 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;
}