summaryrefslogtreecommitdiff
path: root/bin/systrace/policy.c
diff options
context:
space:
mode:
authorRobert Nagy <robert@cvs.openbsd.org>2006-03-18 19:03:24 +0000
committerRobert Nagy <robert@cvs.openbsd.org>2006-03-18 19:03:24 +0000
commit9e3f87f64b71a261ac7c20fabe32a8b46dfa3ac8 (patch)
treeec6ec1f91385abb44cadf82fded06335a4c7eb03 /bin/systrace/policy.c
parent934f7c1306cc745b7ca91e5814225598dcfdf641 (diff)
fix problems found by Coverity via NetBSD:
- systrace.c: Don't try to dereference pw when it's NULL. Coverity CID 900 - parse.y: free allocated space on failure Coverity CID 1661 - policy.c: Change a return to "goto out" so that fclose will be called. Coverity CID 1881 ok sturm@, ray@
Diffstat (limited to 'bin/systrace/policy.c')
-rw-r--r--bin/systrace/policy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/systrace/policy.c b/bin/systrace/policy.c
index 72c7f685c12..eb8339f0ac4 100644
--- a/bin/systrace/policy.c
+++ b/bin/systrace/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.29 2003/07/19 11:48:58 sturm Exp $ */
+/* $OpenBSD: policy.c,v 1.30 2006/03/18 19:03:23 robert Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -477,7 +477,7 @@ systrace_readtemplate(char *filename, struct policy *policy,
}
if (policy == NULL)
- return (template);
+ goto out;
if (systrace_policyprocess(policy, p) == -1)
goto error;