gpgsm: Fix leaked fd.

* src/engine-gpgsm.c (gpgsm_new): Close gpgsm->diag_cb.server_fd.

--

GnuPG-bug-id: 5074
Reported by: VladislavGrudinin
Fixes-commit: dd21ec997c
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-10-01 11:18:50 +09:00
parent e4ee706e27
commit fd904f87f8

View File

@ -573,9 +573,9 @@ gpgsm_new (void **engine, const char *file_name, const char *home_dir,
_gpgme_io_close (gpgsm->output_cb.server_fd);
if (gpgsm->message_cb.server_fd != -1)
_gpgme_io_close (gpgsm->message_cb.server_fd);
#endif
if (gpgsm->diag_cb.server_fd != -1)
_gpgme_io_close (gpgsm->diag_cb.server_fd);
#endif
if (err)
gpgsm_release (gpgsm);