Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
61c5d2a0
Commit
61c5d2a0
authored
Aug 28, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Sep 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpr: Use CRT allocation functions.
parent
d8966584
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
15 deletions
+10
-15
mpr_main.c
dlls/mpr/mpr_main.c
+4
-9
pwcache.c
dlls/mpr/pwcache.c
+6
-6
wnet.c
dlls/mpr/wnet.c
+0
-0
No files found.
dlls/mpr/mpr_main.c
View file @
61c5d2a0
...
...
@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mpr);
*/
LPVOID
WINAPI
MPR_Alloc
(
DWORD
dwSize
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
dwSize
);
return
calloc
(
1
,
dwSize
);
}
/*****************************************************************
...
...
@@ -46,10 +46,7 @@ LPVOID WINAPI MPR_Alloc( DWORD dwSize )
*/
LPVOID
WINAPI
MPR_ReAlloc
(
LPVOID
lpSrc
,
DWORD
dwSize
)
{
if
(
lpSrc
)
return
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
lpSrc
,
dwSize
);
else
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
dwSize
);
return
_recalloc
(
lpSrc
,
1
,
dwSize
);
}
/*****************************************************************
...
...
@@ -57,10 +54,8 @@ LPVOID WINAPI MPR_ReAlloc( LPVOID lpSrc, DWORD dwSize )
*/
BOOL
WINAPI
MPR_Free
(
LPVOID
lpMem
)
{
if
(
lpMem
)
return
HeapFree
(
GetProcessHeap
(),
0
,
lpMem
);
else
return
FALSE
;
free
(
lpMem
);
return
!!
lpMem
;
}
/*****************************************************************
...
...
dlls/mpr/pwcache.c
View file @
61c5d2a0
...
...
@@ -55,7 +55,7 @@ static LPSTR MPR_GetValueName( LPCSTR pbResource, WORD cbResource, BYTE nType )
LPSTR
name
;
DWORD
i
;
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
6
+
cbResource
*
2
);
name
=
malloc
(
6
+
cbResource
*
2
);
if
(
!
name
)
return
NULL
;
sprintf
(
name
,
"X-%02X-"
,
nType
);
...
...
@@ -114,7 +114,7 @@ DWORD WINAPI WNetCachePassword(
r
=
WN_CANCEL
;
else
r
=
WN_SUCCESS
;
HeapFree
(
GetProcessHeap
(),
0
,
valname
);
free
(
valname
);
}
else
r
=
WN_OUT_OF_MEMORY
;
...
...
@@ -152,7 +152,7 @@ UINT WINAPI WNetRemoveCachedPassword(
r
=
WN_ACCESS_DENIED
;
else
r
=
WN_SUCCESS
;
HeapFree
(
GetProcessHeap
(),
0
,
valname
);
free
(
valname
);
}
else
r
=
WN_OUT_OF_MEMORY
;
...
...
@@ -209,7 +209,7 @@ DWORD WINAPI WNetGetCachedPassword(
r
=
WN_CANCEL
;
else
r
=
WN_SUCCESS
;
HeapFree
(
GetProcessHeap
(),
0
,
valname
);
free
(
valname
);
}
else
r
=
WN_OUT_OF_MEMORY
;
...
...
@@ -299,7 +299,7 @@ UINT WINAPI WNetEnumCachedPasswords(
/* read the value data */
size
=
offsetof
(
PASSWORD_CACHE_ENTRY
,
abResource
[
val_sz
+
data_sz
]
);
entry
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
entry
=
malloc
(
size
);
memcpy
(
entry
->
abResource
,
val
,
val_sz
);
entry
->
cbEntry
=
size
;
entry
->
cbResource
=
val_sz
;
...
...
@@ -311,7 +311,7 @@ UINT WINAPI WNetEnumCachedPasswords(
&
entry
->
abResource
[
val_sz
],
&
data_sz
);
if
(
r
==
ERROR_SUCCESS
)
enumPasswordProc
(
entry
,
param
);
HeapFree
(
GetProcessHeap
(),
0
,
entry
);
free
(
entry
);
}
RegCloseKey
(
hkey
);
...
...
dlls/mpr/wnet.c
View file @
61c5d2a0
This diff is collapsed.
Click to expand it.
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