From d24beadfffee0ab8aff196e05842ae8e40ca7417 Mon Sep 17 00:00:00 2001 From: midipix Date: Jun 22 2020 10:54:13 +0000 Subject: toks_client_connect(): immediately close the symlink to the service's port. --- diff --git a/src/client/toks_client_connect.c b/src/client/toks_client_connect.c index 07ad311..e3dddfd 100644 --- a/src/client/toks_client_connect.c +++ b/src/client/toks_client_connect.c @@ -48,11 +48,12 @@ int32_t toks_client_connect(struct toks_driver_ctx * dctx) &oa))) return status; - toks_set_driver_hsvclink( - dctx,hsvclink); - - if ((status = ntapi->ipc_connect_by_symlink(&hservice,hsvclink))) + if ((status = ntapi->ipc_connect_by_symlink(&hservice,hsvclink))) { + ntapi->zw_close(hsvclink); return status; + } + + ntapi->zw_close(hsvclink); ntapi->tt_aligned_block_memset( &msg,0,sizeof(msg));