]> Git Repo - qemu.git/blobdiff - block/snapshot.c
target/arm: Rewrite helper_sve_ld1*_r using pages
[qemu.git] / block / snapshot.c
index 2953d96c06c3f0c48ae8d7aed2609972efb43ed3..3218a542df833170b4da85f91c726131651d6894 100644 (file)
@@ -25,6 +25,7 @@
 #include "qemu/osdep.h"
 #include "block/snapshot.h"
 #include "block/block_int.h"
+#include "block/qdict.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qerror.h"
@@ -217,7 +218,9 @@ int bdrv_snapshot_goto(BlockDriverState *bs,
         qobject_unref(file_options);
         qdict_put_str(options, "file", bdrv_get_node_name(file));
 
-        drv->bdrv_close(bs);
+        if (drv->bdrv_close) {
+            drv->bdrv_close(bs);
+        }
         bdrv_unref_child(bs, bs->file);
         bs->file = NULL;
 
This page took 0.022565 seconds and 4 git commands to generate.