Hello,

cppcheck spotted a resource leak in python_plugin in case of fstat() error in uwsgi_pyimport_by_filenam().

Please review,
riccardo
diff -r e50378d8e227 plugins/python/python_plugin.c
--- a/plugins/python/python_plugin.c	Sun Jul 01 16:56:30 2012 +0200
+++ b/plugins/python/python_plugin.c	Wed Jul 04 18:56:38 2012 +0200
@@ -369,6 +369,7 @@
 		}
 
 		if (fstat(fileno(pyfile), &pystat)) {
+			fclose(pyfile);
 			uwsgi_error("fstat()");
 			return NULL;
 		}
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to