Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ec0a0b37
Commit
ec0a0b37
authored
Oct 21, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Fix two memory leaks.
Found by valgrind.
parent
45b6cf83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
cookie.c
dlls/winhttp/cookie.c
+5
-8
No files found.
dlls/winhttp/cookie.c
View file @
ec0a0b37
...
...
@@ -39,7 +39,7 @@ static domain_t *add_domain( session_t *session, WCHAR *name )
list_init
(
&
domain
->
entry
);
list_init
(
&
domain
->
cookies
);
domain
->
name
=
name
;
domain
->
name
=
strdupW
(
name
)
;
list_add_tail
(
&
session
->
cookie_cache
,
&
domain
->
entry
);
TRACE
(
"%s
\n
"
,
debugstr_w
(
domain
->
name
));
...
...
@@ -120,7 +120,7 @@ static BOOL add_cookie( session_t *session, cookie_t *cookie, WCHAR *domain_name
}
else
if
((
old_cookie
=
find_cookie
(
domain
,
path
,
cookie
->
name
)))
delete_cookie
(
old_cookie
);
cookie
->
path
=
path
;
cookie
->
path
=
strdupW
(
path
)
;
list_add_tail
(
&
domain
->
cookies
,
&
cookie
->
entry
);
TRACE
(
"domain %s path %s <- %s=%s
\n
"
,
debugstr_w
(
domain_name
),
debugstr_w
(
cookie
->
path
),
...
...
@@ -230,12 +230,9 @@ BOOL set_cookies( request_t *request, const WCHAR *cookies )
ret
=
add_cookie
(
session
,
cookie
,
cookie_domain
,
cookie_path
);
end:
if
(
!
ret
)
{
free_cookie
(
cookie
);
heap_free
(
cookie_domain
);
heap_free
(
cookie_path
);
}
if
(
!
ret
)
free_cookie
(
cookie
);
heap_free
(
cookie_domain
);
heap_free
(
cookie_path
);
heap_free
(
buffer
);
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment