diff options
author | 2002-07-12 12:20:35 +0000 | |
---|---|---|
committer | 2002-07-12 12:20:35 +0000 | |
commit | 0635c32f860a741e212e5646b6d2ce82555fce09 (patch) | |
tree | de7dc3809a4065a1a72fbbe118f5ebc1c6d2b509 /sys/dev/systrace.c | |
parent | 'this is a scanner' (diff) | |
download | wireguard-openbsd-0635c32f860a741e212e5646b6d2ce82555fce09.tar.xz wireguard-openbsd-0635c32f860a741e212e5646b6d2ce82555fce09.zip |
in the error case, just remove an installed argument replacement, it is not
needed
Diffstat (limited to 'sys/dev/systrace.c')
-rw-r--r-- | sys/dev/systrace.c | 8 |
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; |