credui: fix memory leak (found by Smatch).
Lionel Debroux
lionel_debroux at yahoo.fr
Sat Oct 27 08:04:28 CDT 2007
---
dlls/credui/credui_main.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/credui/credui_main.c b/dlls/credui/credui_main.c
index 2f1a113..c360dfa 100644
--- a/dlls/credui/credui_main.c
+++ b/dlls/credui/credui_main.c
@@ -169,8 +169,10 @@ static INT_PTR CALLBACK CredDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
user = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
GetWindowTextW(hwndUsername, user, len + 1);
- if (!user[0])
+ if (!user[0]) {
+ HeapFree(GetProcessHeap(), 0, user);
return TRUE;
+ }
if (!strchrW(user, '\\') && !strchrW(user, '@'))
{
--
1.5.3.2
--------------070304020809000903020806--
More information about the wine-patches
mailing list