fixing bug # 54063 - cleaning up purify errors in win32 installer. r=dveditz, sr=mscott

git-svn-id: svn://10.0.0.236/branches/Netscape_20000922_BRANCH@80403 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ssu%netscape.com
2000-10-05 01:38:33 +00:00
parent 6b6ecbb13f
commit fcb85574f2
2 changed files with 10 additions and 6 deletions

View File

@@ -214,13 +214,13 @@ LRESULT CALLBACK DlgProcLicense(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
if((hFLicense = FindFirstFile(szBuf, &wfdFindFileData)) != INVALID_HANDLE_VALUE)
{
dwFileSize = (wfdFindFileData.nFileSizeHigh * MAXDWORD) + wfdFindFileData.nFileSizeLow;
dwFileSize = (wfdFindFileData.nFileSizeHigh * MAXDWORD) + wfdFindFileData.nFileSizeLow + 1;
FindClose(hFLicense);
if((szLicenseFilenameBuf = NS_GlobalAlloc(dwFileSize)) != NULL)
{
if((fLicense = fopen(szBuf, "r+b")) != NULL)
{
dwBytesRead = fread(szLicenseFilenameBuf, 1, dwFileSize, fLicense);
dwBytesRead = fread(szLicenseFilenameBuf, sizeof(char), dwFileSize, fLicense);
fclose(fLicense);
SetDlgItemText(hDlg, IDC_EDIT_LICENSE, szLicenseFilenameBuf);
}

View File

@@ -568,8 +568,8 @@ DrawBarberBar(HWND hWnd, int nBars)
PAINTSTRUCT ps;
HDC hDC;
RECT rect;
HBRUSH hBrush;
HBRUSH hBrushClear;
HBRUSH hBrush = NULL;
HBRUSH hBrushClear = NULL;
hDC = BeginPaint(hWnd, &ps);
GetClientRect(hWnd, &rect);
@@ -604,8 +604,12 @@ DrawBarberBar(HWND hWnd, int nBars)
}
}
DeleteObject(hBrushClear);
DeleteObject(hBrush);
if(hBrushClear)
DeleteObject(hBrushClear);
if(hBrush)
DeleteObject(hBrush);
EndPaint(hWnd, &ps);
}