New submission from Ondrej Baranovič <nul...@nulano.eu>: The function `winreg_SetValueEx_impl` in `winreg.c`:
1) Allocates memory by calling `Py2Reg`, 2) calls `PySys_Audit` and immediately returns if it indicates an error, 3) calls `RegSetValueExW`, 4) frees memory allocated in (1) and returns. The if-block in (2) should free the memory allocated in (1) if an audit hook raises. Introduced in PR17541. ---------- components: Windows messages: 389591 nosy: nulano, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: winreg: SetValueEx leaks memory if PySys_Audit fails type: resource usage versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43637> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com