Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
14bed07c
Commit
14bed07c
authored
Dec 09, 2007
by
Lionel Debroux
Committed by
Alexandre Julliard
Dec 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Fix memory leaks (found by Smatch).
parent
fe444f02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
hlpfile.c
programs/winhelp/hlpfile.c
+12
-2
No files found.
programs/winhelp/hlpfile.c
View file @
14bed07c
...
...
@@ -1613,7 +1613,12 @@ static BOOL HLPFILE_UncompressLZ77_Phrases(HLPFILE* hlpfile)
phrases
.
offsets
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
unsigned
)
*
(
num
+
1
));
phrases
.
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dec_size
);
if
(
!
phrases
.
offsets
||
!
phrases
.
buffer
)
return
FALSE
;
if
(
!
phrases
.
offsets
||
!
phrases
.
buffer
)
{
HeapFree
(
GetProcessHeap
(),
0
,
phrases
.
offsets
);
HeapFree
(
GetProcessHeap
(),
0
,
phrases
.
buffer
);
return
FALSE
;
}
for
(
i
=
0
;
i
<=
num
;
i
++
)
phrases
.
offsets
[
i
]
=
GET_USHORT
(
buf
,
head_size
+
2
*
i
)
-
2
*
num
-
2
;
...
...
@@ -1672,7 +1677,12 @@ static BOOL HLPFILE_Uncompress_Phrases40(HLPFILE* hlpfile)
phrases
.
offsets
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
unsigned
)
*
(
num
+
1
));
phrases
.
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dec_size
);
if
(
!
phrases
.
offsets
||
!
phrases
.
buffer
)
return
FALSE
;
if
(
!
phrases
.
offsets
||
!
phrases
.
buffer
)
{
HeapFree
(
GetProcessHeap
(),
0
,
phrases
.
offsets
);
HeapFree
(
GetProcessHeap
(),
0
,
phrases
.
buffer
);
return
FALSE
;
}
#define getbit() (ptr += (mask < 0), mask = mask*2 + (mask<=0), (*ptr & mask) != 0)
...
...
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