diff options
author | Joel Brobecker <brobecker@gnat.com> | 2008-07-13 16:58:20 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2008-07-13 16:58:20 +0000 |
commit | 5fe5f5f46ddc01fd0e32180ae5a4420085c05735 (patch) | |
tree | 930424cdc39dd386b5165820dade635fb826babc /gdb/symtab.c | |
parent | b87314eb702d529693bbaacfadc2cbeefd743772 (diff) | |
download | gdb-5fe5f5f46ddc01fd0e32180ae5a4420085c05735.tar.gz |
* symtab.c (expand_line_sal): Fix a memory leak.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 0466490edd9..f676a0cc111 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; |