diff options
Diffstat (limited to 'src/storage/ngram_bdb.cpp')
-rw-r--r-- | src/storage/ngram_bdb.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/storage/ngram_bdb.cpp b/src/storage/ngram_bdb.cpp index a13b431..95afdbd 100644 --- a/src/storage/ngram_bdb.cpp +++ b/src/storage/ngram_bdb.cpp @@ -199,6 +199,10 @@ bool Bigram::get_all_items(GArray * items){ assert(key.size == sizeof(phrase_token_t)); phrase_token_t * token = (phrase_token_t *)key.data; g_array_append_val(items, *token); + + /* Initialize our DBTs. */ + memset(&key, 0, sizeof(DBT)); + memset(&data, 0, sizeof(DBT)); } assert (ret == DB_NOTFOUND); |