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)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"