Skip to content

Commit 49a1209

Browse files
committed
Fix fill_and_set_sslerror() for NULL sslsock
1 parent b852eef commit 49a1209

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ fill_and_set_sslerror(_sslmodulestate *state,
514514
PyObject *init_value, *msg, *key;
515515
PyUnicodeWriter *writer = NULL;
516516

517-
if (ssl_errno == PY_SSL_ERROR_EOF) {
517+
if (ssl_errno == PY_SSL_ERROR_EOF && sslsock != NULL) {
518518
sslsock->got_eof_error = 1;
519519
}
520520

0 commit comments

Comments
 (0)