Commit 472ccab
[Decode] Fix m_dst memory leak in VideoDECODEMJPEGBase_HW::Close()
At the start of each frame, m_dst is allocated to hold the decoded JPEG
data. After a successful decode, it is moved into m_dsts. Close() iterates
m_dsts and frees every entry. However, if the application stops mid-frame
(e.g. hits a frame-count limit), m_dst has been allocated but not yet
transferred into m_dsts. Close() skips it, leaving the allocation dangling.
The Debug CRT detects this leak on DLL unload and calls abort(), producing
STATUS_FATAL_APP_EXIT (exit code -1073740767 / 0xC0000421).
Add explicit delete[] m_dst; m_dst = nullptr; in Close() to cover
this path.1 parent f8df816 commit 472ccab
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1558 | 1558 | | |
1559 | 1559 | | |
1560 | 1560 | | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
1561 | 1564 | | |
1562 | 1565 | | |
1563 | 1566 | | |
| |||
0 commit comments