[PATCH 1/2] libselinux: do not call close(fd) when fd < 0
Stephen Smalley <[email protected]>
| Newsgroups | org.kernel.vger.selinux |
|---|---|
| Message-ID | <[email protected]> |
The error path was incorrectly calling close(fd) when fd < 0. Signed-off-by: Stephen Smalley <[email protected]> --- libselinux/utils/sefcontext_compile.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libselinux/utils/sefcontext_compile.c b/libselinux/utils/sefcontext_compile.c index ab73180d..f8115026 100644 --- a/libselinux/utils/sefcontext_compile.c +++ b/libselinux/utils/sefcontext_compile.c @@ -707,7 +707,6 @@ int main(int argc, char *argv[]) if (fd < 0) { fprintf(stderr, "%s: mkstemp %s failed: %s\n", argv[0], tmp, strerror(errno)); - close(fd); goto err; } -- 2.55.0