mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
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 <rra@stanford.edu> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
6dd07af215
commit
904c9fbeba
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user