diff options
author | chgnrdv <52372310+chgnrdv@users.noreply.github.com> | 2023-05-23 20:01:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-23 20:01:17 (GMT) |
commit | 13b5d79090cdca138ca340de88f57e02279faf6d (patch) | |
tree | d77c14c281222ac945bd1676ae4b13e306444191 /Modules/sha1module.c | |
parent | ae00b810d1d3ad7f1f7e226b02ece37c986330e7 (diff) | |
download | cpython-13b5d79090cdca138ca340de88f57e02279faf6d.zip cpython-13b5d79090cdca138ca340de88f57e02279faf6d.tar.gz cpython-13b5d79090cdca138ca340de88f57e02279faf6d.tar.bz2 |
Fix missing/incomplete NULL checks in multiple source files (#104564)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Diffstat (limited to 'Modules/sha1module.c')
-rw-r--r-- | Modules/sha1module.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/sha1module.c b/Modules/sha1module.c index c66269b..ef8e067 100644 --- a/Modules/sha1module.c +++ b/Modules/sha1module.c @@ -73,6 +73,9 @@ static SHA1object * newSHA1object(SHA1State *st) { SHA1object *sha = (SHA1object *)PyObject_GC_New(SHA1object, st->sha1_type); + if (sha == NULL) { + return NULL; + } sha->lock = NULL; PyObject_GC_Track(sha); return sha; |