diff options
author | Jakub Jelen <jjelen@redhat.com> | 2021-04-07 12:09:59 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-06-08 19:47:28 +0900 |
commit | 70b465e0bf65c9ac6d1f7e242d2b76a84afaac6a (patch) | |
tree | 78b6b3ee6978a25c5ed371b503c1e54fe44baff4 | |
parent | 2a5550b7a13ce627ed0e40ab9582478ab5c9b809 (diff) | |
download | libassuan-70b465e0bf65c9ac6d1f7e242d2b76a84afaac6a.tar.gz |
tests: Avoid leaking file descriptors on errors
* tests/fdpassing.c (client): Close fp on error
--
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
-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; } |