mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
Memory leak.
* src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here, since it allocates it for each state, although only one is needed. (allocate_storage): Do it here.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||
|
||||
Memory leak.
|
||||
|
||||
* src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
|
||||
since it allocates it for each state, although only one is needed.
|
||||
(allocate_storage): Do it here.
|
||||
|
||||
|
||||
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* src/options.h, src/options.c (create_long_option_table): Rename
|
||||
|
||||
@@ -113,6 +113,7 @@ allocate_storage (void)
|
||||
shiftset = XCALLOC (short, nsyms);
|
||||
redset = XCALLOC (short, nrules + 1);
|
||||
state_hash = XCALLOC (state_t *, STATE_HASH_SIZE);
|
||||
shift_symbol = XCALLOC (short, nsyms);
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +155,6 @@ new_itemsets (void)
|
||||
for (i = 0; i < nsyms; i++)
|
||||
kernel_size[i] = 0;
|
||||
|
||||
shift_symbol = XCALLOC (short, nsyms);
|
||||
nshifts = 0;
|
||||
|
||||
for (i = 0; i < nitemset; ++i)
|
||||
|
||||
Reference in New Issue
Block a user