From d8371ef1f6119a136882faa81c09783681314346 Mon Sep 17 00:00:00 2001 From: Kosie van der Merwe Date: Tue, 8 Jan 2013 12:16:40 -0800 Subject: [PATCH] Fixing some issues Valgrind found Summary: Found some issues running Valgrind on `db_test` (there are still some outstanding ones) and fixed them. Test Plan: make check ran `valgrind ./db_test` and saw that errors no longer occur Reviewers: dhruba, vamsi, emayanke, sheki Reviewed By: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D7803 --- db/db_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 9a4648083..304dbc2a1 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -262,7 +262,7 @@ DBImpl::~DBImpl() { delete options_.block_cache; } if (options_.compression_per_level != NULL) { - delete options_.compression_per_level; + delete[] options_.compression_per_level; } delete logger_; @@ -1183,7 +1183,7 @@ void DBImpl::BGWork(void* db) { } void DBImpl::BackgroundCall() { - bool madeProgress; + bool madeProgress = false; DeletionState deletion_state; MutexLock l(&mutex_); // Log(options_.info_log, "XXX BG Thread %llx process new work item", pthread_self());