summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/storage/bdb_utils.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/storage/bdb_utils.h b/src/storage/bdb_utils.h
index b1c5832..7a83793 100644
--- a/src/storage/bdb_utils.h
+++ b/src/storage/bdb_utils.h
@@ -59,6 +59,10 @@ inline bool copy_bdb(DB * srcdb, DB * destdb) {
while ((ret = cursorp->c_get(cursorp, &key, &data, DB_NEXT)) == 0) {
ret = destdb->put(destdb, NULL, &key, &data, 0);
assert(0 == ret);
+
+ /* Initialize our DBTs. */
+ memset(&key, 0, sizeof(DBT));
+ memset(&data, 0, sizeof(DBT));
}
assert(DB_NOTFOUND == ret);