diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-28 18:58:45 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-28 18:58:45 +0200 |
commit | f11cf62016070a26992e92c757da3cf6b96705c8 (patch) | |
tree | bf0c6a8bda0776852de486dd8e295ba8f9f35254 /source4 | |
parent | 8d6f88b469cea1aff0d3211f0a9dbd08e6a31497 (diff) | |
download | samba-f11cf62016070a26992e92c757da3cf6b96705c8.tar.gz samba-f11cf62016070a26992e92c757da3cf6b96705c8.tar.bz2 samba-f11cf62016070a26992e92c757da3cf6b96705c8.zip |
s4:web_server/wsgi.c - provide a better out-of-memory handling for an "asprintf" call
Diffstat (limited to 'source4')
-rw-r--r-- | source4/web_server/wsgi.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |