[PATCH] wininet: avoid memory leak in error exit (Coverity)
Marcus Meissner
marcus at jet.franken.de
Thu Apr 9 11:59:57 CDT 2015
1105059 Resource leak
str would leak
---
dlls/wininet/cookie.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c
index af9dcdf..4784b33 100644
--- a/dlls/wininet/cookie.c
+++ b/dlls/wininet/cookie.c
@@ -341,8 +341,10 @@ static BOOL load_persistent_cookie(LPCWSTR domain, LPCWSTR path)
UnlockUrlCacheEntryStream(cookie, 0);
cookie_container = get_cookie_container(domain, path, TRUE);
- if(!cookie_container)
+ if(!cookie_container) {
+ heap_free(str);
return FALSE;
+ }
GetSystemTimeAsFileTime(&time);
for(pbeg=str; pbeg && *pbeg; name=data=NULL) {
--
1.8.4.5
More information about the wine-patches
mailing list