diff --git a/dlls/wininet/cookie.c b/dlls/wininet/cookie.c index af9dcdf9a9c..4784b33d9cf 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) {