summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2017-09-06 12:36:24 +0000
committerbluhm <bluhm@openbsd.org>2017-09-06 12:36:24 +0000
commit0419fd1c83d34064633a1cf5c7c0478f5cb2aa11 (patch)
treee92dd20f4e7a2ec730b66dbeae19cad074c251da
parentReplace the call to ifa_ifwithaddr() in divert6_output() with a (diff)
downloadwireguard-openbsd-0419fd1c83d34064633a1cf5c7c0478f5cb2aa11.tar.xz
wireguard-openbsd-0419fd1c83d34064633a1cf5c7c0478f5cb2aa11.zip
Do not pass an uninitialized size value to free(9) even if the addr
pointer is NULL as it may generate false positive warnings. requested by markus@
-rw-r--r--sys/kern/vfs_getcwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_getcwd.c b/sys/kern/vfs_getcwd.c
index c424a0e938a..dbe40f62508 100644
--- a/sys/kern/vfs_getcwd.c
+++ b/sys/kern/vfs_getcwd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_getcwd.c,v 1.27 2017/07/28 21:54:49 bluhm Exp $ */
+/* $OpenBSD: vfs_getcwd.c,v 1.28 2017/09/06 12:36:24 bluhm Exp $ */
/* $NetBSD: vfs_getcwd.c,v 1.3.2.3 1999/07/11 10:24:09 sommerfeld Exp $ */
/*
@@ -53,7 +53,7 @@ int
vfs_getcwd_scandir(struct vnode **lvpp, struct vnode **uvpp, char **bpp,
char *bufp, struct proc *p)
{
- int eofflag, tries, dirbuflen, len, reclen, error = 0;
+ int eofflag, tries, dirbuflen = 0, len, reclen, error = 0;
off_t off;
struct uio uio;
struct iovec iov;