From 904c9fbebab97b760dd853fa393e1c576c7db00c Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 12 Jun 2010 10:35:34 +0100 Subject: [PATCH] fs: Can't use store behind data if pioctl errored If the call to a pioctl returns an error, it's possible to reach the end of the storebehind function and try and print an old, or bogus, value from the pioctl data block. Caught by clang-analyzer Change-Id: I1209c0c24730273510fbad98a75a429917836605 Reviewed-on: http://gerrit.openafs.org/2142 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/venus/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/venus/fs.c b/src/venus/fs.c index e37a404eaa..9cc6409ae8 100644 --- a/src/venus/fs.c +++ b/src/venus/fs.c @@ -3341,7 +3341,7 @@ StoreBehindCmd(struct cmd_syndesc *as, void *arock) } /* Having no arguments also reports the default store asynchrony */ - if (verbose && (blob.out_size == sizeof(tsb2))) { + if (!error && verbose && (blob.out_size == sizeof(tsb2))) { fprintf(stdout, "Default store asynchrony is %d kbytes.\n", (tsb2.sb_default / 1024)); }