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
6c1dd0f2
Commit
6c1dd0f2
authored
Dec 11, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Fix memory leak on realloc failure in msi_get_window_text (cppcheck).
parent
3e231d0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
dialog.c
dlls/msi/dialog.c
+5
-2
No files found.
dlls/msi/dialog.c
View file @
6c1dd0f2
...
...
@@ -143,7 +143,7 @@ static HWND hMsiHiddenWindow;
static
LPWSTR
msi_get_window_text
(
HWND
hwnd
)
{
UINT
sz
,
r
;
LPWSTR
buf
;
WCHAR
*
buf
,
*
new_
buf
;
sz
=
0x20
;
buf
=
malloc
(
sz
*
sizeof
(
WCHAR
)
);
...
...
@@ -153,7 +153,10 @@ static LPWSTR msi_get_window_text( HWND hwnd )
if
(
r
<
(
sz
-
1
)
)
break
;
sz
*=
2
;
buf
=
realloc
(
buf
,
sz
*
sizeof
(
WCHAR
)
);
new_buf
=
realloc
(
buf
,
sz
*
sizeof
(
WCHAR
)
);
if
(
!
new_buf
)
free
(
buf
);
buf
=
new_buf
;
}
return
buf
;
...
...
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