summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hogan <doug@cvs.openbsd.org>2015-08-24 06:17:49 +0000
committerDoug Hogan <doug@cvs.openbsd.org>2015-08-24 06:17:49 +0000
commitef6360b9bf5352d54e5e8adc3dd2b4a3c52b6eeb (patch)
treefe2d310c24c16fe21c22b0e2648a91e1d6a5ca1e
parentab630e6bce5f1466444bcacfa967d62cd120f9bb (diff)
Initialize cwdpath so free() is properly handled.
ok deraadt@
-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 cfe77fc4fff..c453ac3efdb 100644
--- a/sys/kern/kern_tame.c
+++ b/sys/kern/kern_tame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_tame.c,v 1.26 2015/08/23 21:30:04 deraadt Exp $ */
+/* $OpenBSD: kern_tame.c,v 1.27 2015/08/24 06:17:48 doug Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -519,7 +519,7 @@ tame_namei(struct proc *p, char *origpath)
if (p->p_p->ps_tamepaths) {
struct whitepaths *wl = p->p_p->ps_tamepaths;
char *fullpath = path, *builtpath = NULL, *canopath = NULL;
- char *cwdpath, *cwd;
+ char *cwdpath = NULL, *cwd;
size_t cwdpathlen, cwdlen, builtlen;
int i, error;