Fix potential memory leak (#7245)
Summary: ``` int* value = new int; ASSERT_NE(nullptr, value); ``` `ASSERT_NE` can expand the expression such that a memory leak is reported by clang analyzer. We can remove this ASSERT_NE since we can assume the memory allocation must succeed. Otherwise a bad alloc exception will be thrown and the process will be killed anyway. Test plan (dev server): ``` USE_CLANG=1 make analyze ``` Pull Request resolved: https://github.com/facebook/rocksdb/pull/7245 Reviewed By: jay-zhuang Differential Revision: D23079641 Pulled By: riversand963 fbshipit-source-id: a6739a903f90f8715f6f1ef3e5c8a329245b8e78main
parent
378bc94d7e
commit
76609cd38a
Loading…
Reference in new issue