Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
dfaabee3
Commit
dfaabee3
authored
Oct 02, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Oct 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Fixed memory leak in error path of CreateUri.
parent
d2a0da17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
uri.c
dlls/urlmon/uri.c
+6
-11
No files found.
dlls/urlmon/uri.c
View file @
dfaabee3
...
...
@@ -3421,14 +3421,12 @@ static HRESULT canonicalize_uri(const parse_data *data, Uri *uri, DWORD flags) {
uri
->
canon_size
=
len
;
if
(
!
canonicalize_scheme
(
data
,
uri
,
flags
,
FALSE
))
{
ERR
(
"(%p %p %x): Unable to canonicalize the scheme of the URI.
\n
"
,
data
,
uri
,
flags
);
heap_free
(
uri
->
canon_uri
);
return
E_INVALIDARG
;
}
uri
->
scheme_type
=
data
->
scheme_type
;
if
(
!
canonicalize_hierpart
(
data
,
uri
,
flags
,
FALSE
))
{
ERR
(
"(%p %p %x): Unable to canonicalize the heirpart of the URI
\n
"
,
data
,
uri
,
flags
);
heap_free
(
uri
->
canon_uri
);
return
E_INVALIDARG
;
}
...
...
@@ -4928,12 +4926,11 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU
if
(
dwFlags
&
~
supported_flags
)
FIXME
(
"Ignoring unsupported flag(s) %x
\n
"
,
dwFlags
&
~
supported_flags
);
ret
=
heap_alloc
(
sizeof
(
Uri
));
if
(
!
ret
)
ret
=
create_uri_obj
();
if
(
!
ret
)
{
*
ppURI
=
NULL
;
return
E_OUTOFMEMORY
;
ret
->
lpIUriVtbl
=
&
UriVtbl
;
ret
->
ref
=
1
;
}
/* Explicitly set the default flags if it doesn't cause a flag conflict. */
apply_default_flags
(
&
dwFlags
);
...
...
@@ -4955,8 +4952,7 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU
/* Validate and parse the URI into it's components. */
if
(
!
parse_uri
(
&
data
,
dwFlags
))
{
/* Encountered an unsupported or invalid URI */
SysFreeString
(
ret
->
raw_uri
);
heap_free
(
ret
);
IUri_Release
(
URI
(
ret
));
*
ppURI
=
NULL
;
return
E_INVALIDARG
;
}
...
...
@@ -4964,8 +4960,7 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU
/* Canonicalize the URI. */
hr
=
canonicalize_uri
(
&
data
,
ret
,
dwFlags
);
if
(
FAILED
(
hr
))
{
SysFreeString
(
ret
->
raw_uri
);
heap_free
(
ret
);
IUri_Release
(
URI
(
ret
));
*
ppURI
=
NULL
;
return
hr
;
}
...
...
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