| 229 | } |
| 230 | |
| 231 | BerkeleyBatch::SafeDbt::~SafeDbt() |
| 232 | { |
| 233 | if (m_dbt.get_data() != nullptr) { |
| 234 | // Clear memory, e.g. in case it was a private key |
| 235 | memory_cleanse(m_dbt.get_data(), m_dbt.get_size()); |
| 236 | // under DB_DBT_MALLOC, data is malloced by the Dbt, but must be |
| 237 | // freed by the caller. |
| 238 | // https://docs.oracle.com/cd/E17275_01/html/api_reference/C/dbt.html |
| 239 | if (m_dbt.get_flags() & DB_DBT_MALLOC) { |
| 240 | free(m_dbt.get_data()); |
| 241 | } |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | const void* BerkeleyBatch::SafeDbt::get_data() const |
| 246 | { |
nothing calls this directly
no test coverage detected