[3.12] gh-46376: Return existing pointer when possible in ctypes (GH-… · python/cpython@54aaaad · GitHub
Skip to content

Commit 54aaaad

Browse files
ambvcode-of-kpp
andauthored
[3.12] gh-46376: Return existing pointer when possible in ctypes (GH-107131) (#107487)
(cherry picked from commit 08447b5) Co-authored-by: Konstantin <kpp.live+github@gmail.com>
1 parent 04bd8c7 commit 54aaaad

3 files changed

Lines changed: 57 additions & 0 deletions

File tree

Lib/test/test_ctypes/test_keeprefs.py

Lines changed: 27 additions & 0 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Prevent memory leak and use-after-free when using pointers to pointers with ctypes

Modules/_ctypes/_ctypes.c

Lines changed: 29 additions & 0 deletions

0 commit comments

Comments
 (0)