summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/web_server/wsgi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index db1a5f2633..bc55850c3b 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -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;
}