]> granicus.if.org Git - python/commit
bpo-36421: Fix a possible double decref in _ctypes.c's PyCArrayType_new(). (GH-12530)
authorZackery Spytz <zspytz@gmail.com>
Mon, 25 Mar 2019 08:07:47 +0000 (02:07 -0600)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 25 Mar 2019 08:07:47 +0000 (10:07 +0200)
commit5e333784f007950f22de44c1ffab5b0c03d6691f
tree1b331b21914777b6d2a75980fa9fd7b00800f150
parentdd5417afcf8924bcdd7077351941ad21727ef644
bpo-36421: Fix a possible double decref in _ctypes.c's PyCArrayType_new(). (GH-12530)

Set type_attr to NULL after the assignment to stgdict->proto (like
what is done with stgdict after the Py_SETREF() call) so that it is
not decrefed twice on error.
Misc/NEWS.d/next/Core and Builtins/2019-03-24-21-33-22.bpo-36421.gJ2Pv9.rst [new file with mode: 0644]
Modules/_ctypes/_ctypes.c