memory leak in hash values fixed

This commit is contained in:
Andrey Starodubtsev
2018-12-11 17:02:38 +03:00
parent c10c930e8f
commit ab568a2666
2 changed files with 8 additions and 5 deletions

View File

@@ -163,6 +163,8 @@ int hash_add(hash_t *table, const char * const key, void *data)
entry->next = table->entries[table_index];
table->entries[table_index] = entry;
table->num_keys++;
} else {
if (table->free) table->free(ctx, entry->value);
}
entry->value = data;