]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-121390: tracemalloc: Fix tracebacks memory leak (GH-121391) (#121393)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 5 Jul 2024 06:59:06 +0000 (08:59 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Jul 2024 06:59:06 +0000 (06:59 +0000)
commit9e542f9a46a06247eafb5bc651fa06f3aaaad5eb
tree6a940cf3bcd32e6687e1d8c9a056f97cac5463c5
parentde86aaa1609203334e203c3ea37553ec2580d626
[3.12] gh-121390: tracemalloc: Fix tracebacks memory leak (GH-121391) (#121393)

gh-121390: tracemalloc: Fix tracebacks memory leak (GH-121391)

The tracemalloc_tracebacks hash table has traceback keys and NULL
values, but its destructors do not reflect this -- key_destroy_func is
NULL while value_destroy_func is raw_free. Swap these to free the
traceback keys instead.
(cherry picked from commit db39bc42f90c151b298f97b780e62703adbf1221)

Co-authored-by: Josh Brobst <jbrobst@proton.me>
Python/tracemalloc.c