Author: cwittich
Date: Tue Mar 4 14:14:07 2008
New Revision: 32560
URL:
http://svn.reactos.org/svn/reactos?rev=3D32560&view=3Drev
Log:
don't try to free non-allocated memory
fix a resource leak
fix some warnings
Modified:
trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c
Modified: trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Too=
ls/config/options.c?rev=3D32560&r1=3D32559&r2=3D32560&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c (original)
+++ trunk/tools/RosBE/RosBE-Windows/Tools/config/options.c Tue Mar 4 14:14=
:07 2008
@@ -159,10 +159,8 @@
else if (wcscmp(ptr, L"_ROSBE_OUTPATH") =3D=3D 0)
wcsncpy(LoadedSettings->outdir, ptr2, wcslen(ptr2)-1);
}
- free(WTempLine);
}
fclose(pFile);
- free(WTempLine);
LoadString(hInstance, MSG_SETLOADSUC, SBTitle, 256);
SetDlgItemText(infoPtr->hwndDlg, ID_STATUSBAR, SBTitle);
}
@@ -259,7 +257,7 @@
case BFFM_INITIALIZED:
{
WCHAR ActualPath[MAX_PATH];
- GetDlgItemText(hwndParent, lParam, ActualPath, MAX_PATH);
+ GetDlgItemText(hwndParent, (INT) lParam, ActualPath, MAX_PATH);
SendMessage(Dlg, BFFM_SETSELECTION, TRUE, (LPARAM)ActualPath);
break;
}
@@ -283,7 +281,7 @@
}
else
{
- SetDlgItemText(hwndParent, lParam, (LPWSTR)wParam);
+ SetDlgItemText(hwndParent, (INT) lParam, (LPWSTR)w=
Param);
}
}
}
@@ -488,7 +486,7 @@
BOOL WriteLogSet;
INT Dialog1 =3D ID_BROWSE;
INT Dialog2 =3D ID_LOGDIR;
- WriteLogSet =3D (SendDlgItemMessageW(Dlg, wParam, =
BM_GETCHECK, 0, 0) =3D=3D BST_CHECKED);
+ WriteLogSet =3D (SendDlgItemMessageW(Dlg, (INT)wPa=
ram, BM_GETCHECK, 0, 0) =3D=3D BST_CHECKED);
if (wParam =3D=3D ID_OTHEROBJ)
{
Dialog1 =3D ID_BROWSEOBJ;
@@ -533,6 +531,9 @@
{
if (infoPtr->hIcon)
DestroyIcon(infoPtr->hIcon);
+ if (infoPtr->hFont)
+ DeleteObject(infoPtr->hFont);
+
}
=
case WM_CLOSE:
@@ -553,7 +554,7 @@
OptionsDlgInfo =3D HeapAlloc(GetProcessHeap(), 0, sizeof(*OptionsDlgIn=
fo));
if (OptionsDlgInfo !=3D NULL)
{
- ZeroMemory(OptionsDlgInfo, sizeof(*OptionsDlgInfo));
+ ZeroMemory(OptionsDlgInfo, sizeof(OPTIONS_DLG));
DialogBoxParam(hInst, MAKEINTRESOURCE(ID_DIALOG), 0, DlgProc, (LPA=
RAM)OptionsDlgInfo);
HeapFree(GetProcessHeap(), 0, OptionsDlgInfo);
}