diff options
Diffstat (limited to 'trust')
-rw-r--r-- | trust/index.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/trust/index.c b/trust/index.c index 6a8e535..2d1da29 100644 --- a/trust/index.c +++ b/trust/index.c @@ -193,9 +193,11 @@ p11_index_free (p11_index *index) p11_dict_free (index->objects); p11_dict_free (index->changes); - for (i = 0; i < NUM_BUCKETS; i++) - free (index->buckets[i].elem); - free (index->buckets); + if (index->buckets) { + for (i = 0; i < NUM_BUCKETS; i++) + free (index->buckets[i].elem); + free (index->buckets); + } free (index); } |