xemu-snapshots.c: Check bs_ro refcnt before unref

This commit is contained in:
oltolm
2026-01-26 20:38:23 +01:00
committed by GitHub
parent 46233d5217
commit 9ea91d8eba
+1 -1
View File
@@ -169,8 +169,8 @@ static void xemu_snapshots_all_load_data(QEMUSnapshotInfo **info,
bdrv_flush(bs_ro);
bdrv_drain(bs_ro);
assert(bs_ro->refcnt == 1);
bdrv_unref(bs_ro);
assert(bs_ro->refcnt == 0);
if (!(*err))
xemu_snapshots_dirty = false;
}