revision 1.6
date: 2004/08/21 18:50:34;  author: alc;  state: Exp;  lines: +3 -1
Properly free the temporary sf_buf in uiomove_fromphys() if a copyin or
copyout fails.

Obtained from: DragonFlyBSD

Spotted out by:	Mark Tinguely
MFC After:	3 days
This commit is contained in:
Olivier Houchard 2008-03-06 22:27:35 +00:00
parent 41c0d2813b
commit af9db76b65
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176886

View File

@ -100,8 +100,10 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
error = copyout(cp, iov->iov_base, cnt);
else
error = copyin(iov->iov_base, cp, cnt);
if (error)
if (error) {
sf_buf_free(sf);
goto out;
}
break;
case UIO_SYSSPACE:
if (uio->uio_rw == UIO_READ)