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
ae1d5912
Commit
ae1d5912
authored
Aug 29, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 29, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Switch to heap helpers in the rest of the code.
parent
5f52333d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
advapi.c
dlls/advapi32/advapi.c
+2
-2
cred.c
dlls/advapi32/cred.c
+0
-0
eventlog.c
dlls/advapi32/eventlog.c
+9
-11
No files found.
dlls/advapi32/advapi.c
View file @
ae1d5912
...
...
@@ -59,7 +59,7 @@ GetUserNameA( LPSTR lpszName, LPDWORD lpSize )
BOOL
ret
;
DWORD
sizeW
=
*
lpSize
;
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeW
*
sizeof
(
WCHAR
)
)))
if
(
!
(
buffer
=
heap_alloc
(
sizeW
*
sizeof
(
WCHAR
)
)))
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
...
...
@@ -71,7 +71,7 @@ GetUserNameA( LPSTR lpszName, LPDWORD lpSize )
else
*
lpSize
=
sizeW
;
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
heap_free
(
buffer
);
return
ret
;
}
...
...
dlls/advapi32/cred.c
View file @
ae1d5912
This diff is collapsed.
Click to expand it.
dlls/advapi32/eventlog.c
View file @
ae1d5912
...
...
@@ -59,7 +59,7 @@ BOOL WINAPI BackupEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
backupW
=
SERV_dup
(
lpBackupFileName
);
ret
=
BackupEventLogW
(
hEventLog
,
backupW
);
HeapFree
(
GetProcessHeap
(),
0
,
backupW
);
heap_free
(
backupW
);
return
ret
;
}
...
...
@@ -116,7 +116,7 @@ BOOL WINAPI ClearEventLogA( HANDLE hEventLog, LPCSTR lpBackupFileName )
backupW
=
SERV_dup
(
lpBackupFileName
);
ret
=
ClearEventLogW
(
hEventLog
,
backupW
);
HeapFree
(
GetProcessHeap
(),
0
,
backupW
);
heap_free
(
backupW
);
return
ret
;
}
...
...
@@ -447,8 +447,8 @@ HANDLE WINAPI OpenBackupEventLogA( LPCSTR lpUNCServerName, LPCSTR lpFileName )
uncnameW
=
SERV_dup
(
lpUNCServerName
);
filenameW
=
SERV_dup
(
lpFileName
);
handle
=
OpenBackupEventLogW
(
uncnameW
,
filenameW
);
HeapFree
(
GetProcessHeap
(),
0
,
uncnameW
);
HeapFree
(
GetProcessHeap
(),
0
,
filenameW
);
heap_free
(
uncnameW
);
heap_free
(
filenameW
);
return
handle
;
}
...
...
@@ -506,8 +506,8 @@ HANDLE WINAPI OpenEventLogA( LPCSTR uncname, LPCSTR source )
uncnameW
=
SERV_dup
(
uncname
);
sourceW
=
SERV_dup
(
source
);
handle
=
OpenEventLogW
(
uncnameW
,
sourceW
);
HeapFree
(
GetProcessHeap
(),
0
,
uncnameW
);
HeapFree
(
GetProcessHeap
(),
0
,
sourceW
);
heap_free
(
uncnameW
);
heap_free
(
sourceW
);
return
handle
;
}
...
...
@@ -688,7 +688,7 @@ BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD d
if
(
wNumStrings
==
0
)
return
TRUE
;
if
(
!
lpStrings
)
return
TRUE
;
wideStrArray
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
LPWSTR
)
*
wNumStrings
);
wideStrArray
=
heap_alloc
(
sizeof
(
LPWSTR
)
*
wNumStrings
);
for
(
i
=
0
;
i
<
wNumStrings
;
i
++
)
{
RtlCreateUnicodeStringFromAsciiz
(
&
str
,
lpStrings
[
i
]);
...
...
@@ -697,10 +697,8 @@ BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD d
ret
=
ReportEventW
(
hEventLog
,
wType
,
wCategory
,
dwEventID
,
lpUserSid
,
wNumStrings
,
dwDataSize
,
(
LPCWSTR
*
)
wideStrArray
,
lpRawData
);
for
(
i
=
0
;
i
<
wNumStrings
;
i
++
)
{
HeapFree
(
GetProcessHeap
(),
0
,
wideStrArray
[
i
]
);
}
HeapFree
(
GetProcessHeap
(),
0
,
wideStrArray
);
heap_free
(
wideStrArray
[
i
]
);
heap_free
(
wideStrArray
);
return
ret
;
}
...
...
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