Commit 2d2e2e1e authored by Alexandre Julliard's avatar Alexandre Julliard

Avoid copying invalid data on error.

parent a1779c1e
...@@ -1617,8 +1617,11 @@ HRESULT WINAPI SHGetFolderPathW( ...@@ -1617,8 +1617,11 @@ HRESULT WINAPI SHGetFolderPathW(
default: default:
FIXME("bogus type %d, please fix\n", type); FIXME("bogus type %d, please fix\n", type);
hr = E_INVALIDARG; hr = E_INVALIDARG;
break;
} }
if (FAILED(hr)) goto end;
/* Expand environment strings if necessary */ /* Expand environment strings if necessary */
if (*szTemp == '%') if (*szTemp == '%')
hr = _SHExpandEnvironmentStrings(szTemp, szBuildPath); hr = _SHExpandEnvironmentStrings(szTemp, szBuildPath);
......
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