diff options
author | Jakub Jelen <[email protected]> | 2021-04-07 10:09:59 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-06-08 10:47:28 +0000 |
commit | 70b465e0bf65c9ac6d1f7e242d2b76a84afaac6a (patch) | |
tree | 78b6b3ee6978a25c5ed371b503c1e54fe44baff4 /tests/fdpassing.c | |
parent | client: Handle inquiry from server with CONFIDENTIAL. (diff) | |
download | libassuan-70b465e0bf65c9ac6d1f7e242d2b76a84afaac6a.tar.gz libassuan-70b465e0bf65c9ac6d1f7e242d2b76a84afaac6a.zip |
tests: Avoid leaking file descriptors on errors
* tests/fdpassing.c (client): Close fp on error
--
Signed-off-by: Jakub Jelen <[email protected]>
Diffstat (limited to 'tests/fdpassing.c')
-rw-r--r-- | tests/fdpassing.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/fdpassing.c b/tests/fdpassing.c index 3e1b71b..0e23ffc 100644 --- a/tests/fdpassing.c +++ b/tests/fdpassing.c @@ -176,6 +176,7 @@ client (assuan_context_t ctx, const char *fname) rc = assuan_sendfd (ctx, fileno (fp)); if (rc) { + fclose (fp); log_error ("assuan_sendfd failed: %s\n", gpg_strerror (rc)); return -1; } |