summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/web_server/wsgi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index 7ee70e1107..7a23ae4658 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -300,7 +300,9 @@ static PyObject *create_environ(bool tls, int content_length, struct http_header
if (!strcasecmp(hdr->name, "Content-Type")) {
PyDict_SetItemString(env, "CONTENT_TYPE", PyString_FromString(hdr->value));
} else {
- asprintf(&name, "HTTP_%s", hdr->name);
+ if (asprintf(&name, "HTTP_%s", hdr->name) < 0) {
+ continue;
+ }
PyDict_SetItemString(env, name, PyString_FromString(hdr->value));
free(name);
}