[3.13] gh-123919: Fix null handling in `_freeze_module.c` (GH-123920) (#123948)

gh-123919: Fix null handling in `_freeze_module.c` (GH-123920)
(cherry picked from commit c8d1dbef5b770b647aa7ff45fd5b269bc7629d0b)

Co-authored-by: sobolevn <mail@sobolevn.me>
1 file changed