◐ Shell
clean mode source ↗

Fix missing/incomplete NULL checks in multiple source files by chgnrdv · Pull Request #104564 · python/cpython

@chgnrdv

* `Modules/_cursesmodule.c:_curses_initscr_impl`: pass `screen_encoding` to `PyCursesWindowObject` constructor instead of assigning it to field with possible NULL dereference
* `Modules/_zoneinfo.c:update_strong_cache`: check `new_node` value for NULL
* `Modules/errnomodule.c:errno_exec`: prevent leak of `error_dict` reference in case if `module_dict` is NULL
* `Modules/posixmodule.c:os_setgroups`: check if `grouplist` is allocated, raise `MemoryError` otherwise
* `Modules/sha1module.c:newSHA1object`: check `sha` value for NULL
* `Modules/zlibmodule.c:ZlibDecompressor__new__`: check `self` value for NULL