View Issue Details

IDProjectCategoryView StatusLast Update
0000401Far ManagerFile associationspublic2007-12-03 14:44
Reporteralexmitin Assigned Toalexy  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Fixed in Version1.80 alpha 1 
Summary0000401: Handle leak in ProcessGlobalFileTypes()
DescriptionThere is a potential handle leak under Windows NT 3.x.

File: filetype.cpp
Line: 336
Function: ProcessGlobalFileTypes()
Context:
int ProcessGlobalFileTypes(const wchar_t *Name,int AlwaysWaitFinish)
{
...
  if (WinVer.dwPlatformId==VER_PLATFORM_WIN32_NT && WinVer.dwMajorVersion<4)
  {
    string strAssocStr;
    string strExpAssocStr;

    strValue += L"\\shell\\open\\command";
    HKEY hKey;
    if (RegOpenKeyW(HKEY_CLASSES_ROOT,strValue,&hKey)!=ERROR_SUCCESS)
      return(FALSE);
    if (RegQueryStringValueEx(hKey,L"",strAssocStr)!=ERROR_SUCCESS)
      return(FALSE); <==[handle leak]====
    RegCloseKey(hKey);
...
}

Observations
================
If RegQueryStringValueEx() fails then the "hKey" handle is not freed with RegCloseKey().
TagsNo tags attached.
Build376

Activities

alexy

2007-12-03 14:44

administrator   bugnote:0000943

376

Issue History

Date Modified Username Field Change
2007-12-02 23:45 alexmitin New Issue
2007-12-02 23:45 alexmitin Status new => assigned
2007-12-02 23:45 alexmitin Assigned To => alexy
2007-12-03 14:44 alexy Build => 376
2007-12-03 14:44 alexy Status assigned => closed
2007-12-03 14:44 alexy Note Added: 0000943
2007-12-03 14:44 alexy Resolution open => fixed
2007-12-03 14:44 alexy Fixed in Version => 1.80 alpha 1