Jelmer,
thanks for pointing this out. I've some other questions which I wrote in
a comment of bug https://bugzilla.samba.org/show_bug.cgi?id=6404. Please
answer there.
Greets,
Matthias
Jelmer Vernooij wrote:
Hi Matthias,
On Fri, 2010-05-28 at 12:08 -0500, Matthias Dieter Wallnöfer wrote:
Summary of changes:
source4/web_server/wsgi.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index 7a23ae4..db1a5f2 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -301,7 +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) {
- continue;
+ PyErr_NoMemory();
+ return NULL;
}
This will leak the 'env' python object. You probably also want to call
Py_DECREF here.
Cheers,
Jelmer