Skip to content

Commit ab53dc1

Browse files
committed
gh-109945 Correct thread issue
Signed-off-by: Nigel Jones <[email protected]>
1 parent abe1743 commit ab53dc1

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
@@ -4395,13 +4395,12 @@ _ssl__SSLContext_set_ecdh_curve(PySSLContext *self, PyObject *name)
43954395
EC_KEY_free(key);
43964396
#else
43974397
int res = SSL_CTX_set1_groups_list(self->ctx, PyBytes_AS_STRING(name_bytes));
4398+
Py_DECREF(name_bytes);
43984399
if (!res) {
4399-
PyErr_Format(PyExc_ValueError,"unknown elliptic curves %R", name_bytes);
4400-
Py_DECREF(name_bytes);
4400+
PyErr_Format(PyExc_ValueError,"unknown elliptic curves %R", name);
44014401
_setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__);
44024402
return NULL;
44034403
}
4404-
Py_DECREF(name_bytes);
44054404
#endif
44064405
Py_RETURN_NONE;
44074406
}

0 commit comments

Comments
 (0)