On 24/7/26 17:23, Hanna Czenczek wrote:
nvme_compare() starts block accounting for the operation, but
nvme_compare_data_cb() (and nvme_compare_mdata_cb()) do not always
finalize the cookie.  Specifically, there are a lot of error paths that
do not call block_acct_failed().

Fix this by putting block_acct_done()/block_acct_failed() under the
`out` labels of nvme_compare_data_cb() and nvme_compare_mdata_cb().

Signed-off-by: Hanna Czenczek <[email protected]>
---
  hw/nvme/ctrl.c | 17 ++++++++++++-----
  1 file changed, 12 insertions(+), 5 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Reply via email to