pp's main() never set outfd to anything else than -1 so there is no
point in closing it.

Signed-off-by: Nicolas Iooss <nicolas.io...@m4x.org>
---
 policycoreutils/hll/pp/pp.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/policycoreutils/hll/pp/pp.c b/policycoreutils/hll/pp/pp.c
index b97a9b34816a..98969eb2f5f3 100644
--- a/policycoreutils/hll/pp/pp.c
+++ b/policycoreutils/hll/pp/pp.c
@@ -73,7 +73,6 @@ int main(int argc, char **argv)
        const char *ofile = NULL;
        FILE *in = NULL;
        FILE *out = NULL;
-       int outfd = -1;
 
        // ignore sigpipe so we can check the return code of write, and 
potentially
        // return a more helpful error message
@@ -159,12 +158,6 @@ exit:
        if (out != NULL) {
                fclose(out);
        }
-       if (outfd != -1) {
-               close(outfd);
-               if (rc != 0) {
-                       unlink(argv[2]);
-               }
-       }
        sepol_module_package_free(mod_pkg);
 
        return rc;
-- 
2.17.1


_______________________________________________
Selinux mailing list
Selinux@tycho.nsa.gov
To unsubscribe, send email to selinux-le...@tycho.nsa.gov.
To get help, send an email containing "help" to selinux-requ...@tycho.nsa.gov.

Reply via email to