Fix use-after-free for WeakKeyMap
commit56a34b5af58b55177d671cc6f12241ef8b18c23c
authorPeter Zhu <[email protected]>
Wed, 21 Aug 2024 13:42:30 +0000 (21 09:42 -0400)
committerPeter Zhu <[email protected]>
Thu, 22 Aug 2024 14:01:55 +0000 (22 10:01 -0400)
treed4778971fff6a2c644dadec2c9e2fecd578bd6ee
parentdf9a6aa94330cbf414afcd957d1b87defc67e1c5
Fix use-after-free for WeakKeyMap

[Bug #20688]

We cannot free the key before the ST_DELETE because it could hash the
key which would read the key and would cause a use-after-free. Instead,
we store the key and free it on the next iteration.
weakmap.c