aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-07-13 16:58:20 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-07-13 16:58:20 +0000
commitdb009c8a0a47811360d9f346c8ee230cee647421 (patch)
tree78c4cb78cd5a515f16005d8f5f31587f79d9913e /gdb/symtab.c
parentb432ffe3e25b71e30f0b05bd332de5cff0ae1bf6 (diff)
downloadgdb-db009c8a0a47811360d9f346c8ee230cee647421.zip
gdb-db009c8a0a47811360d9f346c8ee230cee647421.tar.gz
gdb-db009c8a0a47811360d9f346c8ee230cee647421.tar.bz2
* symtab.c (expand_line_sal): Fix a memory leak.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 0466490..f676a0c 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4456,8 +4456,8 @@ expand_line_sal (struct symtab_and_line sal)
blocks -- for each PC found above we see if there are other PCs
that are in the same block. If yes, the other PCs are filtered out. */
- filter = xmalloc (ret.nelts * sizeof (int));
- blocks = xmalloc (ret.nelts * sizeof (struct block *));
+ filter = alloca (ret.nelts * sizeof (int));
+ blocks = alloca (ret.nelts * sizeof (struct block *));
for (i = 0; i < ret.nelts; ++i)
{
filter[i] = 1;