Skip to content

[3.7] bpo-36421: Fix a possible double decref in _ctypes.c's PyCArrayType_new(). (GH-12530)#12533

Merged
miss-islington merged 1 commit intopython:3.7from
miss-islington:backport-5e33378-3.7
Mar 25, 2019
Merged

[3.7] bpo-36421: Fix a possible double decref in _ctypes.c's PyCArrayType_new(). (GH-12530)#12533
miss-islington merged 1 commit intopython:3.7from
miss-islington:backport-5e33378-3.7

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Mar 25, 2019

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.
(cherry picked from commit 5e33378)

Co-authored-by: Zackery Spytz zspytz@gmail.com

https://bugs.python.org/issue36421

…ew(). (pythonGH-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.
(cherry picked from commit 5e33378)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@miss-islington
Copy link
Contributor Author

@ZackerySpytz and @serhiy-storchaka: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@ZackerySpytz and @serhiy-storchaka: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit fa27870 into python:3.7 Mar 25, 2019
@miss-islington miss-islington deleted the backport-5e33378-3.7 branch March 25, 2019 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants