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
00205754
Commit
00205754
authored
Feb 03, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Feb 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Fix memory leak on realloc failure in RetreiveFileSecurity.
parent
7077c5bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
misc.c
dlls/setupapi/misc.c
+7
-3
No files found.
dlls/setupapi/misc.c
View file @
00205754
...
...
@@ -740,7 +740,7 @@ fail:;
DWORD
WINAPI
RetreiveFileSecurity
(
LPCWSTR
lpFileName
,
PSECURITY_DESCRIPTOR
*
pSecurityDescriptor
)
{
PSECURITY_DESCRIPTOR
SecDesc
;
SECURITY_DESCRIPTOR
*
SecDesc
,
*
New
SecDesc
;
DWORD
dwSize
=
0x100
;
DWORD
dwError
;
...
...
@@ -763,9 +763,13 @@ DWORD WINAPI RetreiveFileSecurity(LPCWSTR lpFileName,
return
dwError
;
}
SecDesc
=
MyRealloc
(
SecDesc
,
dwSize
);
if
(
SecDesc
==
NULL
)
NewSecDesc
=
MyRealloc
(
SecDesc
,
dwSize
);
if
(
NewSecDesc
==
NULL
)
{
MyFree
(
SecDesc
);
return
ERROR_NOT_ENOUGH_MEMORY
;
}
SecDesc
=
NewSecDesc
;
if
(
GetFileSecurityW
(
lpFileName
,
OWNER_SECURITY_INFORMATION
|
GROUP_SECURITY_INFORMATION
|
DACL_SECURITY_INFORMATION
,
...
...
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