mirror of
https://github.com/python/cpython.git
synced 2025-12-11 03:20:01 +00:00
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
1 changed files with 1 additions and 3 deletions
|
|
@ -183,10 +183,8 @@ newPySSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file)
|
||||||
int sockstate;
|
int sockstate;
|
||||||
|
|
||||||
self = PyObject_New(PySSLObject, &PySSL_Type); /* Create new object */
|
self = PyObject_New(PySSLObject, &PySSL_Type); /* Create new object */
|
||||||
if (self == NULL) {
|
if (self == NULL)
|
||||||
PyErr_SetString(PySSLErrorObject, "newPySSLObject error");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
memset(self->server, '\0', sizeof(char) * X509_NAME_MAXLEN);
|
memset(self->server, '\0', sizeof(char) * X509_NAME_MAXLEN);
|
||||||
memset(self->issuer, '\0', sizeof(char) * X509_NAME_MAXLEN);
|
memset(self->issuer, '\0', sizeof(char) * X509_NAME_MAXLEN);
|
||||||
self->server_cert = NULL;
|
self->server_cert = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue