mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
s4:web_server/wsgi.c - free the "env" and "inputstream" objects on an "asprintf" failure
This commit is contained in:
parent
9bfd2c8ebc
commit
76cd237ee5
@ -301,6 +301,8 @@ static PyObject *create_environ(bool tls, int content_length, struct http_header
|
||||
PyDict_SetItemString(env, "CONTENT_TYPE", PyString_FromString(hdr->value));
|
||||
} else {
|
||||
if (asprintf(&name, "HTTP_%s", hdr->name) < 0) {
|
||||
Py_DECREF(env);
|
||||
Py_DECREF(inputstream);
|
||||
PyErr_NoMemory();
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user