summaryrefslogtreecommitdiff
path: root/sys/kern/kern_tame.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_tame.c')
-rw-r--r--sys/kern/kern_tame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_tame.c b/sys/kern/kern_tame.c
index 39cdde0793e..0e07060c8d8 100644
--- a/sys/kern/kern_tame.c
+++ b/sys/kern/kern_tame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_tame.c,v 1.35 2015/08/31 16:17:53 deraadt Exp $ */
+/* $OpenBSD: kern_tame.c,v 1.36 2015/09/01 09:19:21 semarie Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -569,9 +569,9 @@ tame_namei(struct proc *p, char *origpath)
error = 0;
}
}
- free(canopath, M_TEMP, MAXPATHLEN);
if (error)
printf("bad path: %s\n", canopath);
+ free(canopath, M_TEMP, MAXPATHLEN);
return (error); /* Don't hint why it failed */
}