mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
gh-142438: Added missing GIL release in _PySSL_keylog_callback when keylog_bio is unset (gh-142439)
This commit is contained in:
parent
79aa43a979
commit
44d3dc6491
@ -0,0 +1 @@
|
||||
Fixed a possible leaked GIL in _PySSL_keylog_callback.
|
||||
@ -131,7 +131,7 @@ _PySSL_keylog_callback(const SSL *ssl, const char *line)
|
||||
PyThread_type_lock lock = get_state_sock(ssl_obj)->keylog_lock;
|
||||
assert(lock != NULL);
|
||||
if (ssl_obj->ctx->keylog_bio == NULL) {
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
/*
|
||||
* The lock is neither released on exit nor on fork(). The lock is
|
||||
@ -155,6 +155,8 @@ _PySSL_keylog_callback(const SSL *ssl, const char *line)
|
||||
ssl_obj->ctx->keylog_filename);
|
||||
ssl_obj->exc = PyErr_GetRaisedException();
|
||||
}
|
||||
|
||||
done:
|
||||
PyGILState_Release(threadstate);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user