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
33345141
Commit
33345141
authored
Sep 26, 2007
by
Lionel_Debroux
Committed by
Alexandre Julliard
Sep 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Fix memory leaks in error paths (found by Smatch).
parent
8ae0d17d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
mlang.c
dlls/mlang/mlang.c
+11
-2
No files found.
dlls/mlang/mlang.c
View file @
33345141
...
@@ -1884,7 +1884,11 @@ static HRESULT EnumRfc1766_create(MLang_impl* mlang, LANGID LangId,
...
@@ -1884,7 +1884,11 @@ static HRESULT EnumRfc1766_create(MLang_impl* mlang, LANGID LangId,
data
.
total
=
0
;
data
.
total
=
0
;
data
.
allocated
=
32
;
data
.
allocated
=
32
;
data
.
info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data
.
allocated
*
sizeof
(
RFC1766INFO
));
data
.
info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data
.
allocated
*
sizeof
(
RFC1766INFO
));
if
(
!
data
.
info
)
return
S_FALSE
;
if
(
!
data
.
info
)
{
HeapFree
(
GetProcessHeap
(),
0
,
rfc
);
return
S_FALSE
;
}
TlsSetValue
(
MLANG_tls_index
,
&
data
);
TlsSetValue
(
MLANG_tls_index
,
&
data
);
EnumSystemLocalesW
(
enum_locales_proc
,
0
/*LOCALE_SUPPORTED*/
);
EnumSystemLocalesW
(
enum_locales_proc
,
0
/*LOCALE_SUPPORTED*/
);
...
@@ -1892,7 +1896,12 @@ static HRESULT EnumRfc1766_create(MLang_impl* mlang, LANGID LangId,
...
@@ -1892,7 +1896,12 @@ static HRESULT EnumRfc1766_create(MLang_impl* mlang, LANGID LangId,
TRACE
(
"enumerated %d rfc1766 structures
\n
"
,
data
.
total
);
TRACE
(
"enumerated %d rfc1766 structures
\n
"
,
data
.
total
);
if
(
!
data
.
total
)
return
FALSE
;
if
(
!
data
.
total
)
{
HeapFree
(
GetProcessHeap
(),
0
,
data
.
info
);
HeapFree
(
GetProcessHeap
(),
0
,
rfc
);
return
FALSE
;
}
rfc
->
info
=
data
.
info
;
rfc
->
info
=
data
.
info
;
rfc
->
total
=
data
.
total
;
rfc
->
total
=
data
.
total
;
...
...
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