https://bugs.winehq.org/show_bug.cgi?id=56561
Bug ID: 56561 Summary: There is a memory leak defect at line 494 in the file /wine/dlls/dmloader/container.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: ---
Trigger Path for the Defect:
1.A variable named "pNewEntry" is defined at line 389 in the file /wine/dlls/dmloader/container.c. This variable allocates a dynamic memory area using the calloc function at line 391. When the switch-case block at line 492 is satisfied, the program returns at line 494. In this process, the dynamic memory area pointed to by the "pNewEntry" pointer is neither used nor freed like at line 547, resulting in a memory leak defect, as illustrated in the diagram below: https://github.com/LuMingYinDetect/wine_defects/blob/main/wine_4.png