Fix the memory leak in Env_basic_test (#7017)

Summary:
Fix the memory leak broken asan and other test introduced by https://github.com/facebook/rocksdb/issues/6830
Pull Request resolved: https://github.com/facebook/rocksdb/pull/7017

Test Plan: pass asan_check

Reviewed By: siying

Differential Revision: D22190289

Pulled By: zhichao-cao

fbshipit-source-id: 03a095f698b4f9d72fd9374191b17c890d7c2b56
main
Zhichao Cao 5 years ago committed by Facebook GitHub Bot
parent 8efb5cfb6f
commit 83a4dd1a67
  1. 7
      env/env_basic_test.cc

@ -97,8 +97,11 @@ static ROT13BlockCipher encrypt_block_rot13(32);
static CTREncryptionProvider encrypt_provider_ctr(encrypt_block_rot13);
static std::unique_ptr<Env> encrypt_env(new NormalizingEnvWrapper(
NewEncryptedEnv(Env::Default(), &encrypt_provider_ctr)));
static std::unique_ptr<Env> ecpt_env(NewEncryptedEnv(Env::Default(),
&encrypt_provider_ctr));
static std::unique_ptr<Env> encrypt_env(
new NormalizingEnvWrapper(ecpt_env.get()));
INSTANTIATE_TEST_CASE_P(EncryptedEnv, EnvBasicTestWithParam,
::testing::Values(encrypt_env.get()));
INSTANTIATE_TEST_CASE_P(EncryptedEnv, EnvMoreTestWithParam,

Loading…
Cancel
Save