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
a090b46f
Commit
a090b46f
authored
Sep 29, 2013
by
Marcus Meissner
Committed by
Alexandre Julliard
Sep 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Fixed some memory leaks (Coverity).
parent
e9358909
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
crypt.c
dlls/wintrust/crypt.c
+5
-0
No files found.
dlls/wintrust/crypt.c
View file @
a090b46f
...
...
@@ -909,6 +909,7 @@ HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV h
if
(
!
CryptMsgGetParam
(
hmsg
,
CMSG_ATTR_CERT_PARAM
,
i
,
NULL
,
&
size
))
{
CryptMsgClose
(
hmsg
);
HeapFree
(
GetProcessHeap
(),
0
,
cc
);
return
INVALID_HANDLE_VALUE
;
}
sum
+=
size
;
...
...
@@ -916,6 +917,7 @@ HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV h
if
(
!
(
cc
->
attr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
cc
->
attr
)
*
cc
->
attr_count
+
sum
)))
{
CryptMsgClose
(
hmsg
);
HeapFree
(
GetProcessHeap
(),
0
,
cc
);
SetLastError
(
ERROR_OUTOFMEMORY
);
return
INVALID_HANDLE_VALUE
;
}
...
...
@@ -926,12 +928,14 @@ HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV h
{
CryptMsgClose
(
hmsg
);
HeapFree
(
GetProcessHeap
(),
0
,
cc
->
attr
);
HeapFree
(
GetProcessHeap
(),
0
,
cc
);
return
INVALID_HANDLE_VALUE
;
}
if
(
!
CryptMsgGetParam
(
hmsg
,
CMSG_ATTR_CERT_PARAM
,
i
,
p
,
&
size
))
{
CryptMsgClose
(
hmsg
);
HeapFree
(
GetProcessHeap
(),
0
,
cc
->
attr
);
HeapFree
(
GetProcessHeap
(),
0
,
cc
);
return
INVALID_HANDLE_VALUE
;
}
p
+=
size
;
...
...
@@ -948,6 +952,7 @@ HANDLE WINAPI CryptCATOpen(LPWSTR pwszFileName, DWORD fdwOpenFlags, HCRYPTPROV h
cc
->
magic
=
CRYPTCAT_MAGIC
;
return
cc
;
}
HeapFree
(
GetProcessHeap
(),
0
,
cc
);
return
INVALID_HANDLE_VALUE
;
}
...
...
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