summaryrefslogtreecommitdiff
path: root/source4/web_server
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-30 11:01:25 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-30 11:12:25 +0200
commit76cd237ee59a3301166ddcbc4166fc7a133e03e3 (patch)
treed71791c7a4aa403339cb8c62369124e2c5c27d1f /source4/web_server
parent9bfd2c8ebc4d7dbd3fd6f47877d31e7e8f4721a5 (diff)
downloadsamba-76cd237ee59a3301166ddcbc4166fc7a133e03e3.tar.gz
samba-76cd237ee59a3301166ddcbc4166fc7a133e03e3.tar.bz2
samba-76cd237ee59a3301166ddcbc4166fc7a133e03e3.zip
s4:web_server/wsgi.c - free the "env" and "inputstream" objects on an "asprintf" failure
Diffstat (limited to 'source4/web_server')
-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;
}