Commit 568b0804 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

shlwapi: Fix a string leak (Valgrind).

parent 8e548c41
......@@ -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);
......
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