Skip to contentSkip to conversation

qcow2: fix null deref apparent during migration

PATCH In review Alon Levy 2 participants 2 messages Mar 19, 2013 Block layer

lore
Share & tools
lore

Alon Levy

author
#0 lore raw

PATCH 1/1 qcow2: fix null deref apparent during migration

---
 block/qcow2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
block/qcow2.c +3 -1
index 1f99866..260a1d3 100644
@@ -512,7 +512,9 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags)
 
     /* Enable lazy_refcounts according to image and command line options */
     opts = qemu_opts_create_nofail(&qcow2_runtime_opts);
-    qemu_opts_absorb_qdict(opts, options, &local_err);
+    if (options) {
+        qemu_opts_absorb_qdict(opts, options, &local_err);
+    }
     if (error_is_set(&local_err)) {
         qerror_report_err(local_err);
         error_free(local_err);
Signature · 1 line
1.8.1.4