Fix leaks of registry keys. Bug 213985, r=biesi, sr=darin

This commit is contained in:
bzbarsky%mit.edu 2003-07-29 14:51:58 +00:00
parent 5ecd2e0bb8
commit 8e5c67dd92

View File

@ -286,6 +286,7 @@ static nsresult GetMIMEInfoFromRegistry( LPBYTE fileType, nsIMIMEInfo *pInfo )
}
delete [] pDesc;
}
::RegCloseKey(fileTypeKey);
}
else
{
@ -322,6 +323,7 @@ static PRBool typeFromExtEquals(const char *aExt, const char *aType)
eq = strcmp((const char *)pBytes, aType) == 0;
delete[] pBytes;
}
::RegCloseKey(hKey);
}
return eq;
}