Module: wine Branch: master Commit: 4302281d51ef8e6bc41be42f7df04d8510d17545 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4302281d51ef8e6bc41be42f7d...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Apr 11 22:14:56 2016 +0300
ieframe: Handle storage opening failure in shortcut Load().
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ieframe/intshcut.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/ieframe/intshcut.c b/dlls/ieframe/intshcut.c index 563cfc2..2376b1b 100644 --- a/dlls/ieframe/intshcut.c +++ b/dlls/ieframe/intshcut.c @@ -483,6 +483,15 @@ static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileNam return hr; }
+ hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut, + STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &pPropStg); + if (FAILED(hr)) + { + CoTaskMemFree(filename); + CoTaskMemFree(url); + return hr; + } + CoTaskMemFree(This->currentFile); This->currentFile = filename; CoTaskMemFree(This->url); @@ -492,8 +501,6 @@ static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR pszFileNam /* Now we're going to read in the iconfile and iconindex. If we don't find them, that's not a failure case -- it's possible that they just aren't in there. */ - hr = IPropertySetStorage_Open(This->property_set_storage, &FMTID_Intshcut, - STGM_READWRITE | STGM_SHARE_EXCLUSIVE, &pPropStg);
if (get_profile_string(str_header, str_iconfile, pszFileName, &iconfile) == S_OK) {