Module: wine Branch: master Commit: 6f1c143ad5124b3256f66a5376a46cb2d5a1dd02 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f1c143ad5124b3256f66a5376... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed May 8 17:09:34 2013 +0200 mshtml: Set _retval in nsIDirectoryServiceProvider2 functions even when returning failure. --- dlls/mshtml/nsembed.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 1613fe8..4e72464 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -287,6 +287,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro return nsIFile_Clone(profile_directory, _retval); } + *_retval = NULL; return NS_ERROR_FAILURE; } @@ -310,8 +311,10 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr strcpyW(plugin_path+len, gecko_pluginW); nsres = create_nsfile(plugin_path, &plugin_directory); - if(NS_FAILED(nsres)) + if(NS_FAILED(nsres)) { + *_retval = NULL; return nsres; + } } nsres = nsIFile_Clone(plugin_directory, &file); @@ -326,6 +329,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr return NS_OK; } + *_retval = NULL; return NS_ERROR_FAILURE; }