hh: Avoid handle leak (coverity)
Frédéric Delanoy
frederic.delanoy at gmail.com
Wed Oct 31 03:57:50 CDT 2012
CID 713831
---
programs/hh/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/programs/hh/main.c b/programs/hh/main.c
index 8a00e60..885f8ea 100644
--- a/programs/hh/main.c
+++ b/programs/hh/main.c
@@ -27,9 +27,13 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdline, int cmds
HMODULE hModule;
DOWINMAIN *doWinMain;
+ int res;
hModule = LoadLibraryA("hhctrl.ocx");
doWinMain = (DOWINMAIN*) GetProcAddress(hModule, "doWinMain");
- return doWinMain(hInst, cmdline);
+ res = doWinMain(hInst, cmdline);
+ FreeLibrary(hModule);
+
+ return res;
}
--
1.8.0
More information about the wine-patches
mailing list