diff options
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 3ad5135..d72a4cd 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/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 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 |