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
783683be
Commit
783683be
authored
Dec 06, 2011
by
Pierre Schweitzer
Committed by
Alexandre Julliard
Dec 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Fix memory leaks.
parent
d5642a47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
usp10.c
dlls/usp10/usp10.c
+18
-3
No files found.
dlls/usp10/usp10.c
View file @
783683be
...
...
@@ -1439,7 +1439,10 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
{
int
tab_x
=
0
;
if
(
!
(
analysis
->
glyphs
=
heap_alloc_zero
(
sizeof
(
StringGlyphs
)
*
analysis
->
numItems
)))
{
heap_free
(
BidiLevel
);
goto
error
;
}
for
(
i
=
0
;
i
<
analysis
->
numItems
;
i
++
)
{
...
...
@@ -2422,8 +2425,16 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
if
(
!
(
pwOutGlyphs
[
i
]
=
get_cache_glyph
(
psc
,
chInput
)))
{
WORD
glyph
;
if
(
!
hdc
)
return
E_PENDING
;
if
(
GetGlyphIndicesW
(
hdc
,
&
chInput
,
1
,
&
glyph
,
0
)
==
GDI_ERROR
)
return
S_FALSE
;
if
(
!
hdc
)
{
heap_free
(
rChars
);
return
E_PENDING
;
}
if
(
GetGlyphIndicesW
(
hdc
,
&
chInput
,
1
,
&
glyph
,
0
)
==
GDI_ERROR
)
{
heap_free
(
rChars
);
return
S_FALSE
;
}
pwOutGlyphs
[
i
]
=
set_cache_glyph
(
psc
,
chInput
,
glyph
);
}
rChars
[
i
]
=
chInput
;
...
...
@@ -2487,7 +2498,11 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
charProps
=
heap_alloc_zero
(
sizeof
(
SCRIPT_CHARPROP
)
*
cChars
);
if
(
!
charProps
)
return
E_OUTOFMEMORY
;
glyphProps
=
heap_alloc_zero
(
sizeof
(
SCRIPT_GLYPHPROP
)
*
cMaxGlyphs
);
if
(
!
glyphProps
)
return
E_OUTOFMEMORY
;
if
(
!
glyphProps
)
{
heap_free
(
charProps
);
return
E_OUTOFMEMORY
;
}
hr
=
ScriptShapeOpenType
(
hdc
,
psc
,
psa
,
scriptInformation
[
psa
->
eScript
].
scriptTag
,
0
,
NULL
,
NULL
,
0
,
pwcChars
,
cChars
,
cMaxGlyphs
,
pwLogClust
,
charProps
,
pwOutGlyphs
,
glyphProps
,
pcGlyphs
);
...
...
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