From 0db4cde6e2f79f7e5af91dd5fed26d5201e0ec93 Mon Sep 17 00:00:00 2001 From: anand76 Date: Wed, 28 Apr 2021 12:27:40 -0700 Subject: [PATCH] Fix a memory leak in c_test (#8237) Summary: Don't call ```rocksdb_cache_disown_data()``` as it causes the memory allocated for ```shards_``` to be leaked. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8237 Reviewed By: jay-zhuang Differential Revision: D28039061 Pulled By: anand1976 fbshipit-source-id: c3464efe2c006b93b4be87030116a12a124598c4 --- db/c_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/db/c_test.c b/db/c_test.c index 0b1f22b54..e836b1509 100644 --- a/db/c_test.c +++ b/db/c_test.c @@ -2928,7 +2928,6 @@ int main(int argc, char** argv) { rocksdb_readoptions_destroy(roptions); rocksdb_writeoptions_destroy(woptions); rocksdb_compactoptions_destroy(coptions); - rocksdb_cache_disown_data(cache); rocksdb_cache_destroy(cache); rocksdb_comparator_destroy(cmp); rocksdb_dbpath_destroy(dbpath);