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
ac524986
Commit
ac524986
authored
Oct 25, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Oct 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Fix a memory leak.
parent
4d2e148f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
hlpfile.c
programs/winhelp/hlpfile.c
+3
-4
No files found.
programs/winhelp/hlpfile.c
View file @
ac524986
...
@@ -860,7 +860,7 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne
...
@@ -860,7 +860,7 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne
HLPFILE_PARAGRAPH
*
paragraph
,
**
paragraphptr
;
HLPFILE_PARAGRAPH
*
paragraph
,
**
paragraphptr
;
UINT
textsize
;
UINT
textsize
;
BYTE
*
format
,
*
format_end
;
BYTE
*
format
,
*
format_end
;
char
*
text
,
*
text_end
;
char
*
text
,
*
text_
base
,
*
text_
end
;
long
size
;
long
size
;
unsigned
short
bits
;
unsigned
short
bits
;
unsigned
nc
,
ncol
=
1
;
unsigned
nc
,
ncol
=
1
;
...
@@ -874,7 +874,7 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne
...
@@ -874,7 +874,7 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne
if
(
buf
+
0x19
>
end
)
{
WINE_WARN
(
"header too small
\n
"
);
return
FALSE
;};
if
(
buf
+
0x19
>
end
)
{
WINE_WARN
(
"header too small
\n
"
);
return
FALSE
;};
size
=
GET_UINT
(
buf
,
0x4
);
size
=
GET_UINT
(
buf
,
0x4
);
text
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
text
=
text_base
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
text
)
return
FALSE
;
if
(
!
text
)
return
FALSE
;
if
(
hlpfile
->
hasPhrases
)
if
(
hlpfile
->
hasPhrases
)
{
{
...
@@ -1164,8 +1164,7 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne
...
@@ -1164,8 +1164,7 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne
}
}
}
}
}
}
if
(
text_end
!=
(
char
*
)
buf
+
GET_UINT
(
buf
,
0x10
)
+
size
)
HeapFree
(
GetProcessHeap
(),
0
,
text_base
);
HeapFree
(
GetProcessHeap
(),
0
,
text_end
-
size
);
return
TRUE
;
return
TRUE
;
}
}
...
...
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