8000 gh-117953: Small Cleanup of Extensions-Related Machinery Code by ericsnowcurrently · Pull Request #118167 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-117953: Small Cleanup of Extensions-Related Machinery Code #118167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Prev Previous commit
Next Next commit
Revert the fclose() change.
  • Loading branch information
ericsnowcurrently committed Apr 22, 2024
commit 48b10b3ba682329cbec8d1ac795a01ae431a6274
4 changes: 3 additions & 1 deletion Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -3764,10 +3764,12 @@ _imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file)

mod = _PyImport_LoadDynamicModuleWithSpec(spec, fp);

finally:
// XXX Shouldn't this happen in the error cases too.
if (fp) {
fclose(fp);
}

finally:
Py_DECREF(name);
Py_DECREF(path);
return mod;
Expand Down
0