rocksdb/utilities/checkpoint
Omkar Gawde e43171d6ca Fix memory leak in ExportColumnFamily for empty column families (#14458)
Summary:
Pull Request resolved: https://github.com/facebook/rocksdb/pull/14458

In `CheckpointImpl::ExportColumnFamily()`, the assignment
`*metadata = result_metadata` is inside the `for` loop over
`db_metadata.levels`. If the column family has no levels, the loop body
never executes, so the `new ExportImportFilesMetaData()` is leaked and
the caller receives a nullptr despite a success status.

Fix: Move `*metadata = result_metadata` outside the loop.

Reviewed By: anand1976

Differential Revision: D95303457

fbshipit-source-id: 6a9be47bcca257803969eb3daac7b91e95143ebf
2026-03-13 21:14:48 -07:00
..
checkpoint_impl.cc Fix memory leak in ExportColumnFamily for empty column families (#14458) 2026-03-13 21:14:48 -07:00
checkpoint_impl.h Fix CreateCheckpoint not handling failed CleanStagingDirectory well (#12894) 2024-08-06 11:24:29 -07:00
checkpoint_test.cc Fix memory leak in ExportColumnFamily for empty column families (#14458) 2026-03-13 21:14:48 -07:00