Date: Thu, 29 Oct 2015 19:02:24 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290155 - head/sys/kern Message-ID: <201510291902.t9TJ2ODr004428@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Thu Oct 29 19:02:24 2015 New Revision: 290155 URL: https://svnweb.freebsd.org/changeset/base/290155 Log: getnewbuf: Initialize bp to avoid uninitialized pointer dereference and brelse(). This came in recently in r289279. Coverity CID: 1331561 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Oct 29 18:58:18 2015 (r290154) +++ head/sys/kern/vfs_bio.c Thu Oct 29 19:02:24 2015 (r290155) @@ -2885,6 +2885,7 @@ getnewbuf(struct vnode *vp, int slpflag, struct buf *bp; bool metadata, reserved; + bp = NULL; KASSERT((gbflags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC, ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); if (!unmapped_buf_allowed)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510291902.t9TJ2ODr004428>