Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Assert pre/post state in remove_callbacks()
  • Loading branch information
erlend-aasland committed Aug 18, 2023
commit b2d49f3605e6093b27f11b51475b361bdd12504c
14 changes: 8 additions & 6 deletions Modules/_sqlite/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,14 @@ free_callback_contexts(pysqlite_Connection *self)
static void
remove_callbacks(sqlite3 *db)
{
if (db == NULL) {
return;
}
sqlite3_trace_v2(db, SQLITE_TRACE_STMT, 0, 0);
assert(db != NULL);
int rc = sqlite3_trace_v2(db, SQLITE_TRACE_STMT, 0, 0);
assert(rc == SQLITE_OK), (void)rc;
Comment thread
kumaraditya303 marked this conversation as resolved.
Resolved

sqlite3_progress_handler(db, 0, 0, (void *)0);
(void)sqlite3_set_authorizer(db, NULL, NULL);

rc = sqlite3_set_authorizer(db, NULL, NULL);
assert(rc == SQLITE_OK);
Comment thread
erlend-aasland marked this conversation as resolved.
Resolved
}

static int
Expand Down Expand Up @@ -479,7 +481,7 @@ connection_finalize(PyObject *self)
* tear-down, we must not call back into Python. */
PyInterpreterState *interp = PyInterpreterState_Get();
int teardown = _Py_IsInterpreterFinalizing(interp);
if (teardown) {
if (teardown && con->db) {
remove_callbacks(con->db);
Comment thread
erlend-aasland marked this conversation as resolved.
Resolved
}

Expand Down