From 9d735fdbea50237f2c7c80cc04ac07a8cbecae2e Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Sat, 9 Mar 2013 15:50:02 +0100 Subject: [PATCH] plugins/python: don't copy router_name in py_uwsgi_route No need to create a news string since uwsgi_route_api_func use it for just a strcmp. Reported by Coverity as CID #989251. --- plugins/python/uwsgi_pymodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c index 4319b534..5f2a5879 100644 --- a/plugins/python/uwsgi_pymodule.c +++ b/plugins/python/uwsgi_pymodule.c @@ -717,7 +717,7 @@ static PyObject *py_uwsgi_route(PyObject * self, PyObject * args) { return NULL; } - int ret = uwsgi_route_api_func(wsgi_req, uwsgi_str(router_name), uwsgi_str(router_args)); + int ret = uwsgi_route_api_func(wsgi_req, router_name, uwsgi_str(router_args)); return PyInt_FromLong(ret); } #endif