xemu-snapshots.c: Check bs_ro refcnt before unref

This commit is contained in:
oltolm
2026-02-28 02:22:10 -05:00
committed by izzy2lost
parent 0bd4a8b1e2
commit 649499425f
+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;
}