Skip to content

Commit 42ec0c8

Browse files
committed
gh-109945 Correct thread issue
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
1 parent b48e5bc commit 42ec0c8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Modules/_ssl.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4401,13 +4401,12 @@ _ssl__SSLContext_set_ecdh_curve(PySSLContext *self, PyObject *name)
44014401
EC_KEY_free(key);
44024402
#else
44034403
int res = SSL_CTX_set1_groups_list(self->ctx, PyBytes_AS_STRING(name_bytes));
4404+
Py_DECREF(name_bytes);
44044405
if (!res) {
4405-
PyErr_Format(PyExc_ValueError,"unknown elliptic curves %R", name_bytes);
4406-
Py_DECREF(name_bytes);
4406+
PyErr_Format(PyExc_ValueError,"unknown elliptic curves %R", name);
44074407
_setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__);
44084408
return NULL;
44094409
}
4410-
Py_DECREF(name_bytes);
44114410
#endif
44124411
Py_RETURN_NONE;
44134412
}

0 commit comments

Comments
 (0)