nativefiledialog icon indicating copy to clipboard operation
nativefiledialog copied to clipboard

Memory leak in AddFiltersToDialog on Windows (nfd_win.cpp)

Open kcloudy0717 opened this issue 5 years ago • 0 comments

Compilation Environment

  • OS: Windows
  • Compiler: MSVC
  • Compiler Version: MSVC 1928
  • Build directory used: vs2010
  • Have I attempted to reproduce the problem on the devel branch? Yes

Memory leak in AddFiltersToDialog when deallocating COMDLG_FILTERSPEC

Before the function returns in AddFiltersToDialog, the code frees the allocated memory for specList and its members, but it only does it for the pszSpec but not the pszName. In the for loop there should also be a line for NFDi_Free( (void*)specList[i].pszName );.

kcloudy0717 avatar Jan 20 '21 23:01 kcloudy0717