plugin/python: fix leak in uwsgi_file_loader

Reported by Coverity as CID #971055.
This commit is contained in:
Riccardo Magliocchetti
2013-03-09 16:21:16 +01:00
parent 341cfd90b6
commit 28153af4ad
+3 -1
View File
@@ -563,7 +563,9 @@ PyObject *uwsgi_file_loader(void *arg1) {
char *callable = up.callable;
if (!callable) callable = "application";
char *py_filename = uwsgi_concat2("uwsgi_file_", uwsgi_pythonize(filename));
char *pythonized_filename = uwsgi_pythonize(filename);
char *py_filename = uwsgi_concat2("uwsgi_file_", pythonized_filename);
free(pythonized_filename);
wsgi_file_module = uwsgi_pyimport_by_filename(py_filename, filename);
if (!wsgi_file_module) {