Kaydet (Commit) a9eb38f0 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #19437: Fix newPySSLSocket(), handle PyWeakref_NewRef() failure

üst e75996a7
......@@ -528,6 +528,10 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
self->socket_type = socket_type;
self->Socket = PyWeakref_NewRef((PyObject *) sock, NULL);
if (self->Socket == NULL) {
Py_DECREF(self);
return NULL;
}
return self;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment