Blame SOURCES/0011-src-augparse.c-main-call-aug_close-even-on-failure.patch

ee1b47
From 7ae515ec6182fe2e4e834444eadefac0d4ac5fbd Mon Sep 17 00:00:00 2001
ee1b47
From: Pino Toscano <ptoscano@redhat.com>
ee1b47
Date: Fri, 20 Jul 2018 16:34:40 +0200
ee1b47
Subject: [PATCH] * src/augparse.c (main): call aug_close even on failure
ee1b47
ee1b47
Even if the resources will be freed at the exit, manually call aug_close
ee1b47
to make sure that analyzers/checkers see only the real issues.
ee1b47
ee1b47
(cherry picked from commit c1f99b22810526f674f38c4faee647bcf061e4e3)
ee1b47
---
ee1b47
 src/augparse.c | 1 +
ee1b47
 1 file changed, 1 insertion(+)
ee1b47
ee1b47
diff --git a/src/augparse.c b/src/augparse.c
ee1b47
index 96a686c8..ad2342ac 100644
ee1b47
--- a/src/augparse.c
ee1b47
+++ b/src/augparse.c
ee1b47
@@ -140,6 +140,7 @@ int main(int argc, char **argv) {
ee1b47
         if (s != NULL) {
ee1b47
             fprintf(stderr, "%s\n", s);
ee1b47
         }
ee1b47
+        aug_close(aug);
ee1b47
         exit(EXIT_FAILURE);
ee1b47
     }
ee1b47
 
ee1b47
-- 
ee1b47
2.17.2
ee1b47