diff options
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 89f2aaa..9116d9f 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -1467,8 +1467,7 @@ static int PySSL_set_context(PySSLSocket *self, PyObject *value, return -1; #else Py_INCREF(value); - Py_DECREF(self->ctx); - self->ctx = (PySSLContext *) value; + Py_SETREF(self->ctx, (PySSLContext *)value); SSL_set_SSL_CTX(self->ssl, self->ctx->ctx); #endif } else { |