Fix missing/incomplete NULL checks in multiple source files (#104564)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
This commit is contained in:
chgnrdv 2023-05-23 23:01:17 +03:00 committed by GitHub
parent ae00b810d1
commit 13b5d79090
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 1 deletions

View file

@ -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;