mirror of
git://source.winehq.org/git/wine.git
synced 2024-08-31 22:18:00 +00:00
secur32/schannel: Avoid use-after-free in AcquireClientCredentials() (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
70d119b7b4
commit
e44a9d2c2f
|
@ -589,8 +589,9 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const void *schanCred,
|
|||
}
|
||||
params.key_size = key_size;
|
||||
params.key_blob = key_blob;
|
||||
if (GNUTLS_CALL( allocate_certificate_credentials, ¶ms )) goto fail;
|
||||
status = GNUTLS_CALL( allocate_certificate_credentials, ¶ms );
|
||||
free(key_blob);
|
||||
if (status) goto fail;
|
||||
|
||||
handle = schan_alloc_handle(creds, SCHAN_HANDLE_CRED);
|
||||
if (handle == SCHAN_INVALID_HANDLE) goto fail;
|
||||
|
@ -609,7 +610,6 @@ static SECURITY_STATUS schan_AcquireClientCredentials(const void *schanCred,
|
|||
|
||||
fail:
|
||||
free(creds);
|
||||
free(key_blob);
|
||||
return SEC_E_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue