Skip to content

Commit f4bc84d

Browse files
authored
gh-121925: Fix uninitialized variables in main.c (#121926)
1 parent 19cbf8f commit f4bc84d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Modules/main.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,12 @@ static int
264264
pymain_start_pyrepl_no_main(void)
265265
{
266266
int res = 0;
267-
PyObject *pyrepl, *console, *empty_tuple, *kwargs, *console_result;
268-
pyrepl = PyImport_ImportModule("_pyrepl.main");
267+
PyObject *console = NULL;
268+
PyObject *empty_tuple = NULL;
269+
PyObject *kwargs = NULL;
270+
PyObject *console_result = NULL;
271+
272+
PyObject *pyrepl = PyImport_ImportModule("_pyrepl.main");
269273
if (pyrepl == NULL) {
270274
fprintf(stderr, "Could not import _pyrepl.main\n");
271275
res = pymain_exit_err_print();

0 commit comments

Comments
 (0)