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
This commit is contained in:
Kosie van der Merwe 2013-01-08 12:16:40 -08:00
parent 4d339d7462
commit d8371ef1f6
1 changed files with 2 additions and 2 deletions

View File

@ -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());