Commit 6f1c143a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Set _retval in nsIDirectoryServiceProvider2 functions even when returning failure.

parent f649ee59
...@@ -287,6 +287,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro ...@@ -287,6 +287,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServicePro
return nsIFile_Clone(profile_directory, _retval); return nsIFile_Clone(profile_directory, _retval);
} }
*_retval = NULL;
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
...@@ -310,8 +311,10 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr ...@@ -310,8 +311,10 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr
strcpyW(plugin_path+len, gecko_pluginW); strcpyW(plugin_path+len, gecko_pluginW);
nsres = create_nsfile(plugin_path, &plugin_directory); nsres = create_nsfile(plugin_path, &plugin_directory);
if(NS_FAILED(nsres)) if(NS_FAILED(nsres)) {
*_retval = NULL;
return nsres; return nsres;
}
} }
nsres = nsIFile_Clone(plugin_directory, &file); nsres = nsIFile_Clone(plugin_directory, &file);
...@@ -326,6 +329,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr ...@@ -326,6 +329,7 @@ static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServicePr
return NS_OK; return NS_OK;
} }
*_retval = NULL;
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment