https://bugs.winehq.org/show_bug.cgi?id=56564
Bug ID: 56564 Summary: There is a memory leak defect at line 2212 in the file /wine/dlls/comctl32/imagelist.c. Product: Wine Version: 9.6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: lumingying@bupt.edu.cn Distribution: ---
In the file /wine/dlls/comctl32/imagelist.c, a variable named himl is defined at line 2190. This pointer allocates a dynamic memory area through the function ImageList_Create at line 2205. When the if statement at line 2209 returns true, the program will return at line 2212. During this process, the dynamic memory area pointed to by himl is neither used nor released, resulting in a memory leak, as illustrated in the diagram below: https://github.com/LuMingYinDetect/wine_defects/blob/main/wine_7.png