From f11cf62016070a26992e92c757da3cf6b96705c8 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 28 May 2010 18:58:45 +0200 Subject: s4:web_server/wsgi.c - provide a better out-of-memory handling for an "asprintf" call --- source4/web_server/wsgi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/web_server') diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c index 7a23ae4658..db1a5f2633 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; } PyDict_SetItemString(env, name, PyString_FromString(hdr->value)); free(name); -- cgit