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
950792ae
Commit
950792ae
authored
Feb 02, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Feb 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Fix memory leak on error path in dwarf2_read_range (cppcheck).
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
78df9cb9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
dwarf.c
dlls/dbghelp/dwarf.c
+8
-2
No files found.
dlls/dbghelp/dwarf.c
View file @
950792ae
...
...
@@ -1289,6 +1289,7 @@ static struct addr_range* dwarf2_get_ranges(const dwarf2_debug_info_t* di, unsig
{
struct
attribute
range
;
struct
addr_range
*
ranges
;
struct
addr_range
*
new_ranges
;
if
(
dwarf2_find_attribute
(
di
,
DW_AT_ranges
,
&
range
))
{
...
...
@@ -1312,8 +1313,13 @@ static struct addr_range* dwarf2_get_ranges(const dwarf2_debug_info_t* di, unsig
if
(
*
num_ranges
>=
alloc
)
{
alloc
*=
2
;
ranges
=
realloc
(
ranges
,
sizeof
(
struct
addr_range
)
*
alloc
);
if
(
!
ranges
)
return
NULL
;
new_ranges
=
realloc
(
ranges
,
sizeof
(
struct
addr_range
)
*
alloc
);
if
(
!
new_ranges
)
{
free
(
ranges
);
return
NULL
;
}
ranges
=
new_ranges
;
}
ranges
[
*
num_ranges
].
low
=
di
->
unit_ctx
->
compiland
->
address
+
low
;
ranges
[
*
num_ranges
].
high
=
di
->
unit_ctx
->
compiland
->
address
+
high
;
...
...
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