Home GnuPG
Diffusion GnuPG 18eff31496a3

tpm2d: Fix socket resource leak on Windows.

Description

tpm2d: Fix socket resource leak on Windows.

* tpm2d/tpm2daemon.c (main): Use gnupg_fd_t for socket, and use
assuan_sock_close for the socket allocated by assuan_sock_new.
(handle_connections): Use gnupg_fd_t for listen_fd.
Use assuan_sock_close for the socket by npth_accept.

Apply the same change of scdaemon to tpm2daemon.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Mar 30 2022, 5:52 AM
Parents
rG2189b4bb638c: common,w32: Fix handle_to_fd to match use of _open_osfhandle.
Branches
Unknown
Tags
Unknown