mirror of https://github.com/python/cpython
Don't mask a no memory error with a less meaningful one as discussed on python-checkins
This commit is contained in:
parent
09d1236b89
commit
38e3b7d2d3
|
@ -183,10 +183,8 @@ newPySSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file)
|
|||
int sockstate;
|
||||
|
||||
self = PyObject_New(PySSLObject, &PySSL_Type); /* Create new object */
|
||||
if (self == NULL) {
|
||||
PyErr_SetString(PySSLErrorObject, "newPySSLObject error");
|
||||
if (self == NULL)
|
||||
return NULL;
|
||||
}
|
||||
memset(self->server, '\0', sizeof(char) * X509_NAME_MAXLEN);
|
||||
memset(self->issuer, '\0', sizeof(char) * X509_NAME_MAXLEN);
|
||||
self->server_cert = NULL;
|
||||
|
|
Loading…
Reference in New Issue