summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 5f305aa..f87c53f 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -89,7 +89,7 @@ int
PyRun_AnyFileExFlags(FILE *fp, const char *filename, int closeit,
PyCompilerFlags *flags)
{
- PyObject *filename_obj;
+ PyObject *filename_obj = NULL;
if (filename != NULL) {
filename_obj = PyUnicode_DecodeFSDefault(filename);
if (filename_obj == NULL) {
@@ -97,9 +97,6 @@ PyRun_AnyFileExFlags(FILE *fp, const char *filename, int closeit,
return -1;
}
}
- else {
- filename_obj = NULL;
- }
int res = _PyRun_AnyFileObject(fp, filename_obj, closeit, flags);
Py_XDECREF(filename_obj);
return res;