aboutsummaryrefslogtreecommitdiff
path: root/lib/util/str_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/str_table.c')
-rw-r--r--lib/util/str_table.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/util/str_table.c b/lib/util/str_table.c
index 6363c81..a9d91e5 100644
--- a/lib/util/str_table.c
+++ b/lib/util/str_table.c
@@ -45,6 +45,8 @@ static int strings_grow(str_table_t *table)
int str_table_init(str_table_t *table, size_t size)
{
+ memset(table, 0, sizeof(*table));
+
table->buckets = calloc(size, sizeof(table->buckets[0]));
table->num_buckets = size;