diff options
author | Chris Hall (GMCH) <chris.hall@highwayman.com> | 2009-12-10 13:40:05 +0000 |
---|---|---|
committer | Chris Hall (GMCH) <chris.hall@highwayman.com> | 2009-12-10 13:40:05 +0000 |
commit | 16899228d96d10853ff46cac2e24ab311b44e574 (patch) | |
tree | 69050e3c3542a1cc121ee6f5aa8d46888ed895a2 /lib/symtab.c | |
parent | e4024f34fc4a72c9d680ea61bf28b10d0cb80854 (diff) | |
download | quagga-16899228d96d10853ff46cac2e24ab311b44e574.tar.bz2 quagga-16899228d96d10853ff46cac2e24ab311b44e574.tar.xz |
Fix reaming of empty symbol table -- lib/symtab.c
Diffstat (limited to 'lib/symtab.c')
-rw-r--r-- | lib/symtab.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/symtab.c b/lib/symtab.c index 885be426..57a49396 100644 --- a/lib/symtab.c +++ b/lib/symtab.c @@ -423,7 +423,8 @@ symbol_table_ream(symbol_table table, int free_structure) symbol sym ; unsigned int i ; - i = table->base_count ; + /* There are no actual bases until they have been allocated. */ + i = (table->bases != NULL) ? table->base_count : 0 ; while (i--) { @@ -453,7 +454,7 @@ symbol_table_ream(symbol_table table, int free_structure) } ; symbol_table_reset(table, free_structure) ; - + /* asserts(table->entry_count == 0) */ return NULL ; } ; |