1
0
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:
Matthias Dieter Wallnöfer 2010-05-30 11:01:25 +02:00
parent 9bfd2c8ebc
commit 76cd237ee5

View File

@ -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;
}