WinInet: Fix Use after Free Bug

Robert Shearman rob at codeweavers.com
Thu Aug 26 07:40:26 CDT 2004


Changelog:
Don't use freed memory.

-------------- next part --------------
Index: wine/dlls/wininet/urlcache.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/urlcache.c,v
retrieving revision 1.20
diff -u -p -r1.20 urlcache.c
--- wine/dlls/wininet/urlcache.c	19 Aug 2004 19:57:37 -0000	1.20
+++ wine/dlls/wininet/urlcache.c	26 Aug 2004 12:37:44 -0000
@@ -1229,8 +1229,8 @@ BOOL WINAPI GetUrlCacheEntryInfoW(LPCWST
     if (!URLCache_FindEntryInHash(pHeader, lpszUrlA, &pEntry))
     {
         URLCacheContainer_UnlockIndex(pContainer, pHeader);
-        HeapFree(GetProcessHeap(), 0, lpszUrlA);
         WARN("entry %s not found!\n", debugstr_a(lpszUrlA));
+        HeapFree(GetProcessHeap(), 0, lpszUrlA);
         SetLastError(ERROR_FILE_NOT_FOUND);
         return FALSE;
     }


More information about the wine-patches mailing list