diff options
author | Valentin Bartenev <vbart@nginx.com> | 2019-11-14 17:48:48 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2019-11-14 17:48:48 +0300 |
commit | cd6cb02be08906e28738d62485cdc3d9d75592bb (patch) | |
tree | 387d2dae3ab6a5625aef03936a66e4935efd3bb5 | |
parent | e9429324c218942ba05fa586cd139c81a94e2b66 (diff) | |
download | unit-cd6cb02be08906e28738d62485cdc3d9d75592bb.tar.gz unit-cd6cb02be08906e28738d62485cdc3d9d75592bb.tar.bz2 |
Python: fixed potential object leak in case of allocation error.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_python_wsgi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nxt_python_wsgi.c b/src/nxt_python_wsgi.c index 7c4a94f1..a4b5a1f5 100644 --- a/src/nxt_python_wsgi.c +++ b/src/nxt_python_wsgi.c @@ -383,6 +383,8 @@ nxt_python_request_handler(nxt_unit_request_info_t *req) args = PyTuple_New(2); if (nxt_slow_path(args == NULL)) { + Py_DECREF(environ); + nxt_unit_req_error(req, "Python failed to create arguments tuple"); rc = NXT_UNIT_ERROR; |