X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b7266188b87f3620ec3f9f717e57194a7dd989fe..d1ecb069dfe24481e4a83f44cb5217a2b06746d7:/bsd/vfs/vfs_journal.c?ds=sidebyside diff --git a/bsd/vfs/vfs_journal.c b/bsd/vfs/vfs_journal.c index 30230cf09..7ff95f478 100644 --- a/bsd/vfs/vfs_journal.c +++ b/bsd/vfs/vfs_journal.c @@ -2486,6 +2486,8 @@ journal_modify_block_abort(journal *jnl, struct buf *bp) } if (jnl->flags & JOURNAL_INVALID) { + /* Still need to buf_brelse(). Callers assume we consume the bp. */ + buf_brelse(bp); return EINVAL; } @@ -2541,6 +2543,8 @@ journal_modify_block_end(journal *jnl, struct buf *bp, void (*func)(struct buf * CHECK_JOURNAL(jnl); if (jnl->flags & JOURNAL_INVALID) { + /* Still need to buf_brelse(). Callers assume we consume the bp. */ + buf_brelse(bp); return EINVAL; }