From df0ee9cc6cde1372621adb93361552e8f3408880 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Wed, 7 Apr 2021 12:12:48 +0200 Subject: [PATCH] Address not important coverity scan issues --- libassuan-2.5.5-coverity.patch | 22 ++++++++++++++++++++++ libassuan.spec | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 libassuan-2.5.5-coverity.patch diff --git a/libassuan-2.5.5-coverity.patch b/libassuan-2.5.5-coverity.patch new file mode 100644 index 0000000..196141c --- /dev/null +++ b/libassuan-2.5.5-coverity.patch @@ -0,0 +1,22 @@ +commit f2bf4b1e81d46dc00e3d478dd88fd994a944d4d5 +Author: Jakub Jelen +Date: Wed Apr 7 12:09:59 2021 +0200 + + tests: Avoid leaking file descriptors on errors + + -- + + Signed-off-by: Jakub Jelen + +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; + } diff --git a/libassuan.spec b/libassuan.spec index 3dd6452..19730f0 100644 --- a/libassuan.spec +++ b/libassuan.spec @@ -10,6 +10,7 @@ Source1: https://gnupg.org/ftp/gcrypt/libassuan/libassuan-%{version}.tar.bz2.sig URL: https://www.gnupg.org/ Patch1: libassuan-2.5.2-multilib.patch +Patch2: libassuan-2.5.5-coverity.patch BuildRequires: gcc BuildRequires: gawk @@ -37,6 +38,7 @@ This package contains files needed to develop applications using %{name}. %setup -q %patch1 -p1 -b .multilib +%patch2 -p1 -b .coverity %build