diff options
author | bp <bp@FreeBSD.org> | 1999-12-28 16:14:54 +0000 |
---|---|---|
committer | bp <bp@FreeBSD.org> | 1999-12-28 16:14:54 +0000 |
commit | 4e45fd34493f7dae6d001a4801f163c4a9119684 (patch) | |
tree | 3b5a82436e9a18680ff29120fab242a61677abd7 /sys/msdosfs | |
parent | 5f346bab48d27ee52d2e0fdd4d06d29baa316d73 (diff) | |
download | FreeBSD-src-4e45fd34493f7dae6d001a4801f163c4a9119684.zip FreeBSD-src-4e45fd34493f7dae6d001a4801f163c4a9119684.tar.gz |
Avoid to write garbage if uiomove fails.
Diffstat (limited to 'sys/msdosfs')
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 3ad5135..d72a4cd 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -780,6 +780,10 @@ msdosfs_write(ap) * Copy the data from user space into the buf header. */ error = uiomove(bp->b_data + croffset, n, uio); + if (error) { + brelse(bp); + break; + } /* * If they want this synchronous then write it and wait for |