summaryrefslogtreecommitdiff
path: root/sys/dev/systrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/systrace.c')
-rw-r--r--sys/dev/systrace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c
index f3b964f0661..f407e2d8da7 100644
--- a/sys/dev/systrace.c
+++ b/sys/dev/systrace.c
@@ -1048,8 +1048,10 @@ systrace_preprepl(struct str_process *strp, struct systrace_replace *repl)
if (ret)
return (ret);
- if (strp->replace != NULL)
+ if (strp->replace != NULL) {
free(strp->replace, M_XDATA);
+ strp->replace = NULL;
+ }
if (repl->strr_nrepl < 0 || repl->strr_nrepl > SYSTR_MAXARGS)
return (EINVAL);