Commit fe7d36f
authored
Fix __cxa_find_matching_catch's memory leak (emscripten-core#8947)
`__cxa_find_matching_catch` allocated a buffer of size 4 using `malloc` only
when it was first called and reused it through the entire program run. And this
malloc'ed memory wasn't freed. Because this is only allocated once, I changed it
to a static allocation using `makeStaticAlloc`.
Fixes emscripten-core#8919.1 parent f6a2515 commit fe7d36f
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | 282 | | |
284 | 283 | | |
285 | 284 | | |
286 | | - | |
287 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
288 | 292 | | |
289 | 293 | | |
290 | 294 | | |
| |||
0 commit comments