diff options
author | Hanna Czenczek <hreitz@redhat.com> | 2023-08-24 17:53:40 +0200 |
---|---|---|
committer | Hanna Czenczek <hreitz@redhat.com> | 2023-08-29 10:49:58 +0200 |
commit | 56d1a022a77ea2125564913665eeadf3e303a671 (patch) | |
tree | c43a18f5066cccf6f1129efc54702859bfc907d6 /chardev/char-parallel.c | |
parent | 3b2337eff03e23ffcc7d6b0a0f72bd3ab2135ae9 (diff) | |
download | qemu-56d1a022a77ea2125564913665eeadf3e303a671.zip qemu-56d1a022a77ea2125564913665eeadf3e303a671.tar.gz qemu-56d1a022a77ea2125564913665eeadf3e303a671.tar.bz2 |
file-posix: Clear bs->bl.zoned on error
bs->bl.zoned is what indicates whether the zone information is present
and valid; it is the only thing that raw_refresh_zoned_limits() sets if
CONFIG_BLKZONED is not defined, and it is also the only thing that it
sets if CONFIG_BLKZONED is defined, but there are no zones.
Make sure that it is always set to BLK_Z_NONE if there is an error
anywhere in raw_refresh_zoned_limits() so that we do not accidentally
announce zones while our information is incomplete or invalid.
This also fixes a memory leak in the last error path in
raw_refresh_zoned_limits().
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-Id: <20230824155345.109765-2-hreitz@redhat.com>
Reviewed-by: Sam Li <faithilikerun@gmail.com>
Diffstat (limited to 'chardev/char-parallel.c')
0 files changed, 0 insertions, 0 deletions