diff options
author | Sebastien Marie <semarie@cvs.openbsd.org> | 2016-03-25 17:25:37 +0000 |
---|---|---|
committer | Sebastien Marie <semarie@cvs.openbsd.org> | 2016-03-25 17:25:37 +0000 |
commit | 0caf1e51b79119a7d6e79c85dc2b35d1820ced43 (patch) | |
tree | 6cf6ab418f671235fdaee1d4700a9de5a70488b5 /sys/kern/kern_pledge.c | |
parent | b5f235b5c78cf48e7eed3395575042cc9df2b2f2 (diff) |
Silences compiler warnings, about used uninitialized variables. These lengths
are passed uninitialized to free(9) only when pointers are NULL.
found by jsg@
ok deraadt@
Diffstat (limited to 'sys/kern/kern_pledge.c')
-rw-r--r-- | sys/kern/kern_pledge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index c6ebe39cbac..8a056d7331a 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.160 2016/03/22 05:59:17 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.161 2016/03/25 17:25:36 semarie Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -1633,7 +1633,7 @@ resolvpath(struct proc *p, { int error; char *abspath = NULL, *canopath = NULL, *fullpath = NULL; - size_t abspathlen, canopathlen, fullpathlen, canopathlen_exact; + size_t abspathlen, canopathlen = 0, fullpathlen = 0, canopathlen_exact; /* 1. get an absolute path (inside any chroot) : path -> abspath */ if (path[0] != '/') { |