mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vschannel: add missing guards against multiple calls to vschannel_cleanup (#10895)
This commit is contained in:
parent
41982053f1
commit
4f22ae4a30
2
thirdparty/vschannel/vschannel.c
vendored
2
thirdparty/vschannel/vschannel.c
vendored
@ -60,11 +60,13 @@ void vschannel_cleanup(TlsContext *tls_ctx) {
|
||||
// Close socket.
|
||||
if(tls_ctx->socket != INVALID_SOCKET) {
|
||||
closesocket(tls_ctx->socket);
|
||||
tls_ctx->socket = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
// Close "MY" certificate store.
|
||||
if(tls_ctx->cert_store) {
|
||||
CertCloseStore(tls_ctx->cert_store, 0);
|
||||
tls_ctx->cert_store = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user