projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0716f9e
)
capi_get_provname: free name on error if it was malloc'ed
author
Jonas Maebe
<jonas.maebe@elis.ugent.be>
Sun, 8 Dec 2013 22:04:54 +0000
(23:04 +0100)
committer
Kurt Roeckx
<kurt@roeckx.be>
Thu, 4 Dec 2014 22:48:44 +0000
(23:48 +0100)
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
engines/e_capi.c
patch
|
blob
|
history
diff --git
a/engines/e_capi.c
b/engines/e_capi.c
index d4221cbae3f24e6a18a38f5ea4db7815e7cc71d6..f06d298324a6f293b500e386fb07e7ad9bea20c8 100644
(file)
--- a/
engines/e_capi.c
+++ b/
engines/e_capi.c
@@
-1155,6
+1155,8
@@
static int capi_get_provname(CAPI_CTX *ctx, LPSTR *pname, DWORD *ptype, DWORD id
if (!CryptEnumProviders(idx, NULL, 0, ptype, name, &len))
{
err = GetLastError();
+ if (sizeof(TCHAR) == sizeof(char))
+ OPENSSL_free(name);
if (err == ERROR_NO_MORE_ITEMS)
return 2;
CAPIerr(CAPI_F_CAPI_GET_PROVNAME, CAPI_R_CRYPTENUMPROVIDERS_ERROR);