shlwapi: Fix a string leak (Valgrind).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-06-11 21:42:05 +03:00 committed by Alexandre Julliard
parent 8e548c41c1
commit 568b08047b
1 changed files with 3 additions and 1 deletions

View File

@ -958,8 +958,10 @@ HRESULT WINAPI UrlEscapeA(
if(!RtlCreateUnicodeStringFromAsciiz(&urlW, pszUrl))
return E_INVALIDARG;
if(dwFlags & URL_ESCAPE_AS_UTF8)
if(dwFlags & URL_ESCAPE_AS_UTF8) {
RtlFreeUnicodeString(&urlW);
return E_NOTIMPL;
}
if((ret = UrlEscapeW(urlW.Buffer, escapedW, &lenW, dwFlags)) == E_POINTER) {
escapedW = HeapAlloc(GetProcessHeap(), 0, lenW * sizeof(WCHAR));
ret = UrlEscapeW(urlW.Buffer, escapedW, &lenW, dwFlags);