summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2002-07-12 12:20:36 +0000
committerNiels Provos <provos@cvs.openbsd.org>2002-07-12 12:20:36 +0000
commit64e656e7d9cd68a82ca9d23edfd658ddef483316 (patch)
tree6ca93dab9016aaef074a727e4992cdf4ebf71b8a /sys/dev
parent094dd7b9833dd39ebda7877f28ed2169a4432149 (diff)
in the error case, just remove an installed argument replacement, it is not
needed
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/systrace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c
index c1b352f4148..1a98a1c4ec8 100644
--- a/sys/dev/systrace.c
+++ b/sys/dev/systrace.c
@@ -673,9 +673,13 @@ systrace_redirect(int code, struct proc *p, void *v, register_t *retval)
fst = NULL;
if (!error && (strp = p->p_systrace) != NULL) {
/* XXX - do I need to lock here? */
- if (strp->answer == SYSTR_POLICY_NEVER)
+ if (strp->answer == SYSTR_POLICY_NEVER) {
error = strp->error;
- else {
+ if (strp->replace != NULL) {
+ free(strp->replace, M_XDATA);
+ strp->replace = NULL;
+ }
+ } else {
if (ISSET(strp->flags, STR_PROC_SYSCALLRES)) {
CLR(strp->flags, STR_PROC_SYSCALLRES);
report = 1;