[lldb-dev] [Bug 47088] New: All allocated dynamic memory should be explicitly deallocated to avoid memory leaks.(llvm-project/lldb/source/Host/windows/Windows.cpp:line 146)

via lldb-dev lldb-dev at lists.llvm.org
Mon Aug 10 02:35:23 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47088

            Bug ID: 47088
           Summary: All allocated dynamic memory should be explicitly
                    deallocated to avoid memory
                    leaks.(llvm-project/lldb/source/Host/windows/Windows.c
                    pp:line 146)
           Product: lldb
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: info at ustchcs.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

All allocated dynamic memory should be explicitly deallocated to avoid memory
leaks.Before return on line 146, the memory allocated on line 130 is not freed.

commit e3546c78cabfbf670391a57766872f0a8e28a423

llvm-project/lldb/source/Host/windows/Windows.cpp:line 146

   141    wchar_t wideFullPathBuffer[PATH_MAX];
   142    wchar_t *wideFullPath;
   143    if ((wideFullPath = _wfullpath(wideFullPathBuffer, wideName,
PATH_MAX)) ==
   144        NULL) {
   145      errno = ENAMETOOLONG;
   146      return NULL;
   147    }

Reported by: Ustchcs Toolsets Bugfinder
(bugfinder-13.19: All allocated dynamic memory should be explicitly deallocated
to avoid memory leaks.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200810/9a2adb53/attachment.html>


More information about the lldb-dev mailing list