Nikolay Sivov : shlwapi: Keep pointer to allocated block to free it later ( Valgrind).
Alexandre Julliard
julliard at winehq.org
Mon Jan 17 10:59:42 CST 2011
Module: wine
Branch: master
Commit: d6c0752913bc8fbab12ba0f9e2866b31eaaa6efc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d6c0752913bc8fbab12ba0f9e2866b31eaaa6efc
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sat Jan 15 20:14:39 2011 +0300
shlwapi: Keep pointer to allocated block to free it later (Valgrind).
---
dlls/shlwapi/url.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c
index bb5e633..6b469e2 100644
--- a/dlls/shlwapi/url.c
+++ b/dlls/shlwapi/url.c
@@ -1072,7 +1072,7 @@ HRESULT WINAPI UrlEscapeW(
LPCWSTR src;
DWORD needed = 0, ret;
BOOL stop_escaping = FALSE;
- WCHAR next[5], *dst = pszEscaped;
+ WCHAR next[5], *dst = pszEscaped, *dst_ptr = NULL;
INT len;
PARSEDURLW parsed_url;
DWORD int_flags;
@@ -1092,7 +1092,7 @@ HRESULT WINAPI UrlEscapeW(
FIXME("Unimplemented flags: %08x\n", dwFlags);
if(pszUrl == pszEscaped) {
- dst = HeapAlloc(GetProcessHeap(), 0, *pcchEscaped*sizeof(WCHAR));
+ dst_ptr = dst = HeapAlloc(GetProcessHeap(), 0, *pcchEscaped*sizeof(WCHAR));
if(!dst)
return E_OUTOFMEMORY;
}
@@ -1224,7 +1224,7 @@ HRESULT WINAPI UrlEscapeW(
*pcchEscaped = needed;
if(pszUrl == pszEscaped)
- HeapFree(GetProcessHeap(), 0, dst);
+ HeapFree(GetProcessHeap(), 0, dst_ptr);
return ret;
}
More information about the wine-cvs
mailing list