Skip to content

Commit 9c3f17e

Browse files
Copilotbbockelm
andcommitted
Fix resource management in delete_jwks function
Co-authored-by: bbockelm <1093447+bbockelm@users.noreply.github.com>
1 parent 44c06f5 commit 9c3f17e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/scitokens_cache.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,9 @@ bool scitokens::Validator::delete_jwks(const std::string &issuer) {
548548
sqlite3_busy_timeout(db, SQLITE_BUSY_TIMEOUT_MS);
549549

550550
// Use the existing remove_issuer_entry function
551+
// Note: remove_issuer_entry closes the database on error
551552
if (remove_issuer_entry(db, issuer, true) != 0) {
553+
// Database already closed by remove_issuer_entry
552554
return false;
553555
}
554556

0 commit comments

Comments
 (0)