diff options
author | Hao Zeng <zenghao@kylinos.cn> | 2023-04-21 14:20:19 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-05-19 01:36:09 -0400 |
commit | 71ba92f3488b64bd5c81e2872c56e88cea21bb95 (patch) | |
tree | 517399b4ebe17dd377c8d7b68abbab99be8fcb9a /util/async.c | |
parent | 5d410557dea452f6231a7c66155e29a37e168528 (diff) | |
download | qemu-71ba92f3488b64bd5c81e2872c56e88cea21bb95.zip qemu-71ba92f3488b64bd5c81e2872c56e88cea21bb95.tar.gz qemu-71ba92f3488b64bd5c81e2872c56e88cea21bb95.tar.bz2 |
hw/cxl: cdat: Fix open file not closed in ct3_load_cdat()
Open file descriptor not closed in error paths. Fix by replace
open coded handling of read of whole file into a buffer with
g_file_get_contents()
Fixes: aba578bdac ("hw/cxl: CDAT Data Object Exchange implementation")
Signed-off-by: Zeng Hao <zenghao@kylinos.cn>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Jonathan Cameron via <qemu-devel@nongnu.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
--
Changes since v5:
- Drop if guard on g_free() as per checkpatch warning.
Message-Id: <20230421132020.7408-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'util/async.c')
0 files changed, 0 insertions, 0 deletions