From b3c9c5057fb83d62b44f154d2062bd0bbd5c54e6 Mon Sep 17 00:00:00 2001 From: "roberto@quantal64" Date: Sun, 8 Jul 2012 21:31:09 +0200 Subject: [PATCH] fixed a typo and an fd leak spotted by riccardo --- plugins/python/python_plugin.c | 1 + uwsgi.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index a7ec1f3c..f6f48c63 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -370,6 +370,7 @@ PyObject *uwsgi_pyimport_by_filename(char *name, char *filename) { } if (fstat(fileno(pyfile), &pystat)) { + fclose(pyfile); uwsgi_error("fstat()"); return NULL; } diff --git a/uwsgi.c b/uwsgi.c index 609cc649..f669a0e4 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -455,7 +455,7 @@ static struct uwsgi_option uwsgi_base_options[] = { {"dump-options", no_argument, 0, "dump the full list of available options", uwsgi_opt_true, &uwsgi.dump_options, 0}, {"show-config", no_argument, 0, "show the current config reformatted as ini", uwsgi_opt_true, &uwsgi.show_config, 0}, {"print", required_argument, 0, "simple print", uwsgi_opt_print, NULL, 0}, - {"cflags", no_argument, 0, "report uWSGI CFLAGS (useful for buildign external plugins)", uwsgi_opt_cflags, NULL, UWSGI_OPT_IMMEDIATE}, + {"cflags", no_argument, 0, "report uWSGI CFLAGS (useful for building external plugins)", uwsgi_opt_cflags, NULL, UWSGI_OPT_IMMEDIATE}, {"version", no_argument, 0, "print uWSGI version", uwsgi_opt_print, UWSGI_VERSION, 0}, {0, 0, 0, 0, 0, 0, 0} };