Author: pschweitzer
Date: Wed Apr 30 22:03:49 2014
New Revision: 63085
URL:
http://svn.reactos.org/svn/reactos?rev=63085&view=rev
Log:
[RAPPS]
Close downloaded application before attempting to execute it.
CORE-8134 #resolve
Modified:
trunk/reactos/base/applications/rapps/loaddlg.c
Modified: trunk/reactos/base/applications/rapps/loaddlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/lo…
==============================================================================
--- trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] Wed Apr 30 22:03:49 2014
@@ -217,7 +217,7 @@
BOOL bCab = FALSE;
HINTERNET hOpen = NULL;
HINTERNET hFile = NULL;
- HANDLE hOut = NULL;
+ HANDLE hOut = INVALID_HANDLE_VALUE;
unsigned char lpBuffer[4096];
const LPWSTR lpszAgent = L"RApps/1.0";
@@ -284,6 +284,9 @@
}
while (dwBytesRead);
+ CloseHandle(hOut);
+ hOut = INVALID_HANDLE_VALUE;
+
if (bCancelled) goto end;
ShowWindow(Dlg, SW_HIDE);
@@ -294,7 +297,7 @@
ShellExecuteW( NULL, L"open", path, NULL, NULL, SW_SHOWNORMAL );
}
end:
- CloseHandle(hOut);
+ if (hOut != INVALID_HANDLE_VALUE) CloseHandle(hOut);
InternetCloseHandle(hFile);
InternetCloseHandle(hOpen);