diff options
author | sobolevn <mail@sobolevn.me> | 2024-07-17 16:13:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-17 16:13:37 (GMT) |
commit | f4bc84d261c828ed81f137f2a48fa2f0de7a0211 (patch) | |
tree | e899b435120ae2b2124deedd05e5d12ca1c062c8 /Modules/main.c | |
parent | 19cbf8fd636192059550d0c908c3e29797feed1f (diff) | |
download | cpython-f4bc84d261c828ed81f137f2a48fa2f0de7a0211.zip cpython-f4bc84d261c828ed81f137f2a48fa2f0de7a0211.tar.gz cpython-f4bc84d261c828ed81f137f2a48fa2f0de7a0211.tar.bz2 |
gh-121925: Fix uninitialized variables in `main.c` (#121926)
Diffstat (limited to 'Modules/main.c')
-rw-r--r-- | Modules/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/main.c b/Modules/main.c index bd77558..3c202c8 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -264,8 +264,12 @@ static int pymain_start_pyrepl_no_main(void) { int res = 0; - PyObject *pyrepl, *console, *empty_tuple, *kwargs, *console_result; - pyrepl = PyImport_ImportModule("_pyrepl.main"); + PyObject *console = NULL; + PyObject *empty_tuple = NULL; + PyObject *kwargs = NULL; + PyObject *console_result = NULL; + + PyObject *pyrepl = PyImport_ImportModule("_pyrepl.main"); if (pyrepl == NULL) { fprintf(stderr, "Could not import _pyrepl.main\n"); res = pymain_exit_err_print(); |