]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42412: Fix possible leaks and check arguments in PyType_FromModuleAndSpec() ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 21 Nov 2020 11:09:40 +0000 (03:09 -0800)
committerGitHub <noreply@github.com>
Sat, 21 Nov 2020 11:09:40 +0000 (03:09 -0800)
commitd153eb8a1e47123ecdb3fb47995a2c39ce7713ea
treed5000f339ad95d098d15ee370b302f00f6d88f0a
parent713b4bbd97392acc492a4fefb2d07ae61fb7b75d
bpo-42412: Fix possible leaks and check arguments in PyType_FromModuleAndSpec() (GH-23410)

* There were leaks if Py_tp_bases is used more than once or if some call is
  failed before setting tp_bases.
* There was a crash if the bases argument or the Py_tp_bases slot is not a tuple.
* The documentation was not accurate.
(cherry picked from commit 1db76394ea79030aa4ed5349c950f6c6da51450f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/c-api/type.rst
Objects/typeobject.c