From 318a4919d209a7c42332baea7e9ab5703f759167 Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Mon, 11 Nov 2013 14:42:52 -0800 Subject: [PATCH] Fix valgrind check by initialising DeletionState. Summary: The valgrind error was introduced by commit 1510339e5257073af82f8c07e6fa1f2a9144e6aa. Initialize DeletionState in constructor. Test Plan: valgrind --leak-check=yes ./deletefile_test Reviewers: igor, kailiu Reviewed By: kailiu CC: leveldb Differential Revision: https://reviews.facebook.net/D13983 --- db/db_impl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/db/db_impl.h b/db/db_impl.h index 3c8788e13..f1559f21c 100644 --- a/db/db_impl.h +++ b/db/db_impl.h @@ -179,6 +179,12 @@ class DBImpl : public DB { // the current manifest_file_number, log_number and prev_log_number // that corresponds to the set of files in 'live'. uint64_t manifest_file_number, log_number, prev_log_number; + + DeletionState() { + manifest_file_number = 0; + log_number = 0; + prev_log_number = 0; + } }; // Delete any unneeded files and stale in-memory entries. -- GitLab