[Bug 56569] New: There is a memory leak defect at line 231 in the file negotiate.c located at /wine/dlls/secur32/.
https://bugs.winehq.org/show_bug.cgi?id=56569 Bug ID: 56569 Summary: There is a memory leak defect at line 231 in the file negotiate.c located at /wine/dlls/secur32/. Product: Wine Version: 9.6 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: lumingying(a)bupt.edu.cn Distribution: --- A pointer variable named new_ctxt is defined at line 212 in the file negotiate.c located at /wine/dlls/secur32/. This pointer allocates a block of dynamic memory using the function calloc at line 225. When the if statement at line 225 evaluates to false, it indicates that the dynamic memory allocation for new_ctxt was successful. However, when the if statement at line 231 evaluates to true, the program returns at line 231, thus skipping the release of the dynamically allocated memory pointed to by new_ctxt at line 316, resulting in a memory leak defect, as illustrated in the diagram below: https://github.com/LuMingYinDetect/wine_defects/blob/main/wine_13.png -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=56569 Bernhard Übelacker <bernhardu(a)mailbox.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu(a)mailbox.org --- Comment #1 from Bernhard Übelacker <bernhardu(a)mailbox.org> --- Hello lumingyin, the block with the calloc is just reached `if (credential)`, then handle gets assigned the value of `credential`, before the allocation by `calloc`. Therefore if this allocation is reached, `handle` has always a non-null value. Am I missing something, can you confirm this? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=56569 --- Comment #2 from Nikolay Sivov <bunglehead(a)gmail.com> --- Agreed, looks like a false positive. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=56569 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Component|-unknown |secur32 Status|UNCONFIRMED |RESOLVED CC| |damjan.jov(a)gmail.com --- Comment #3 from Damjan Jovanovic <damjan.jov(a)gmail.com> --- Yes, false positive, resolving invalid. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla