Skip to content

Commit c690e8c

Browse files
committed
[3.14] gh-142516: fix reference leaks in ssl.SSLContext objects (GH-143685) (#145075)
* [3.14] gh-142516: fix reference leaks in `ssl.SSLContext` objects (GH-143685) (cherry picked from commit 3a2a686) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> * fix backport
1 parent 5aa7ad2 commit c690e8c

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Modules/_ssl.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,6 @@ typedef struct {
334334
PyObject *exc;
335335
} PySSLSocket;
336336

337-
#define PySSLSocket_CAST(op) ((PySSLSocket *)(op))
338-
339337
typedef struct {
340338
PyObject_HEAD
341339
BIO *bio;
@@ -2294,9 +2292,8 @@ PySSL_traverse(PySSLSocket *self, visitproc visit, void *arg)
22942292
}
22952293

22962294
static int
2297-
PySSL_clear(PySSLSocket *op)
2295+
PySSL_clear(PySSLSocket *self)
22982296
{
2299-
PySSLSocket *self = PySSLSocket_CAST(op);
23002297
Py_CLEAR(self->Socket);
23012298
Py_CLEAR(self->ctx);
23022299
Py_CLEAR(self->owner);

0 commit comments

Comments
 (0)