Don't leak an mbuf when a write rpc returns zero bytes written.
Obtained from: NetBSD
This commit is contained in:
parent
a710a27b67
commit
d6bad9e190
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36522
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.93 1998/05/31 17:48:05 peter Exp $
|
||||
* $Id: nfs_vnops.c,v 1.94 1998/05/31 18:23:24 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1137,6 +1137,7 @@ nfs_writerpc(vp, uiop, cred, iomode, must_commit)
|
||||
rlen = fxdr_unsigned(int, *tl++);
|
||||
if (rlen == 0) {
|
||||
error = NFSERR_IO;
|
||||
m_freem(mrep);
|
||||
break;
|
||||
} else if (rlen < len) {
|
||||
backup = len - rlen;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.93 1998/05/31 17:48:05 peter Exp $
|
||||
* $Id: nfs_vnops.c,v 1.94 1998/05/31 18:23:24 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1137,6 +1137,7 @@ nfs_writerpc(vp, uiop, cred, iomode, must_commit)
|
||||
rlen = fxdr_unsigned(int, *tl++);
|
||||
if (rlen == 0) {
|
||||
error = NFSERR_IO;
|
||||
m_freem(mrep);
|
||||
break;
|
||||
} else if (rlen < len) {
|
||||
backup = len - rlen;
|
||||
|
Loading…
Reference in New Issue
Block a user