Browse Source

linkhash.c: optimised the table_free path

tags/json-c-0.13-20171207
Eswar Yaganti 9 years ago
parent
commit
5fb63a09f9
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      linkhash.c

+ 2
- 3
linkhash.c View File

@@ -562,10 +562,9 @@ int lh_table_resize(struct lh_table *t, int new_size)
void lh_table_free(struct lh_table *t)
{
struct lh_entry *c;
for(c = t->head; c != NULL; c = c->next) {
if(t->free_fn) {
if(t->free_fn) {
for(c = t->head; c != NULL; c = c->next)
t->free_fn(c);
}
}
free(t->table);
free(t);


Loading…
Cancel
Save