fix(stream): clear the freed ptr
This commit is contained in:
parent
79d4596b72
commit
94a2ea1ad5
|
@ -910,6 +910,7 @@ void streamBackendCleanup(void* arg) {
|
|||
|
||||
if (pHandle->db) {
|
||||
rocksdb_close(pHandle->db);
|
||||
pHandle->db = NULL;
|
||||
}
|
||||
rocksdb_options_destroy(pHandle->dbOpt);
|
||||
rocksdb_env_destroy(pHandle->env);
|
||||
|
@ -2508,6 +2509,7 @@ STaskDbWrapper* taskDbOpenImpl(const char* key, char* statePath, char* dbPath) {
|
|||
}
|
||||
|
||||
rocksdb_close(pTaskDb->db);
|
||||
pTaskDb->db = NULL;
|
||||
|
||||
if (cfNames != NULL) {
|
||||
rocksdb_list_column_families_destroy(cfNames, nCf);
|
||||
|
@ -2617,6 +2619,7 @@ void taskDbDestroy(void* pDb, bool flush) {
|
|||
|
||||
if (wrapper->db) {
|
||||
rocksdb_close(wrapper->db);
|
||||
wrapper->db = NULL;
|
||||
}
|
||||
|
||||
rocksdb_options_destroy(wrapper->dbOpt);
|
||||
|
|
Loading…
Reference in New Issue