fix error of address sanitize

This commit is contained in:
Rongsong Shen 2025-11-24 17:39:18 +08:00
parent 8831040043
commit 0a63d49852
2 changed files with 16 additions and 5 deletions

View file

@ -44,7 +44,10 @@ bool xcecd_db_init(xcecd_db_t** db,
XCECD_LOG(XCE_LOG_ERROR,
"Failed to open database: %s",
sqlite3_errmsg(*db));
FREEUP(*db);
if ((*db) != NULL) {
sqlite3_close(*db);
}
return false;
}