Fix a potential Use-after-free in test_blockjob_common_drain_node() (v6.2.0).

2022-02-24 Thread wliang
Hi all, I find a potential Use-after-free in QEMU 6.2.0, which is in test_blockjob_common_drain_node() (./tests/unit/test-bdrv-drain.c). Specifically, at line 880, the variable 'scr' is released by the bdrv_unref(). However, at line 881, it is subsequently used as the 1st parameter of the

Fix a potential Use-after-free in test_blockjob_common_drain_node() (v6.2.0).

2022-02-23 Thread wliang
Hi all, I find a potential Use-after-free in QEMU 6.2.0, which is in test_blockjob_common_drain_node() (./tests/unit/test-bdrv-drain.c). Specifically, at line 880, the variable 'scr' is released by the bdrv_unref(). However, at line 881, it is subsequently used as the 1st parameter of the