summaryrefslogtreecommitdiffstats
path: root/src/libfs/read.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-05 05:53:11 +0000
committerrsc <devnull@localhost>2004-03-05 05:53:11 +0000
commit15680d56a6c6e15921d958aa6006825c2cd20bf8 (patch)
tree84abb4cb8d761fb49d688b3eebcf17e47f05372a /src/libfs/read.c
parent230d62c4756ece47951e96a7cb1b5b72cf6a3844 (diff)
downloadplan9port-15680d56a6c6e15921d958aa6006825c2cd20bf8.tar.gz
plan9port-15680d56a6c6e15921d958aa6006825c2cd20bf8.zip
Amazingly picky bug fixes from Valgrind.
Diffstat (limited to 'src/libfs/read.c')
-rw-r--r--src/libfs/read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libfs/read.c b/src/libfs/read.c
index 7cd4fd14..9765602c 100644
--- a/src/libfs/read.c
+++ b/src/libfs/read.c
@@ -28,7 +28,8 @@ fprint(2, "n %d msize %d\n", n, msize);
tx.offset = offset;
tx.count = n;
- fsrpc(fid->fs, &tx, &rx, &freep);
+ if(fsrpc(fid->fs, &tx, &rx, &freep) < 0)
+ return -1;
if(rx.type == Rerror){
werrstr("%s", rx.ename);
free(freep);