Blob Blame History Raw
From 7ae515ec6182fe2e4e834444eadefac0d4ac5fbd Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Fri, 20 Jul 2018 16:34:40 +0200
Subject: [PATCH] * src/augparse.c (main): call aug_close even on failure

Even if the resources will be freed at the exit, manually call aug_close
to make sure that analyzers/checkers see only the real issues.

(cherry picked from commit c1f99b22810526f674f38c4faee647bcf061e4e3)
---
 src/augparse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/augparse.c b/src/augparse.c
index 96a686c8..ad2342ac 100644
--- a/src/augparse.c
+++ b/src/augparse.c
@@ -140,6 +140,7 @@ int main(int argc, char **argv) {
         if (s != NULL) {
             fprintf(stderr, "%s\n", s);
         }
+        aug_close(aug);
         exit(EXIT_FAILURE);
     }
 
-- 
2.17.2