From 568b08047b71ba12f9e35f73a87ca3a53f0736b0 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 11 Jun 2016 21:42:05 +0300 Subject: [PATCH] shlwapi: Fix a string leak (Valgrind). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/shlwapi/url.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index 85fa3c147cc..ee9381882ee 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -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);