Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 19030a0

Browse files
committed
Plug memory leak.
1 parent bd2983c commit 19030a0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/posixmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5578,6 +5578,7 @@ INITFUNC(void)
55785578
PyDict_SetItemString(d, "error", PyExc_OSError);
55795579

55805580
#ifdef HAVE_PUTENV
5581-
posix_putenv_garbage = PyDict_New();
5581+
if (posix_putenv_garbage == NULL)
5582+
posix_putenv_garbage = PyDict_New();
55825583
#endif
55835584
}

0 commit comments

Comments
 (0)