aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/qemu-option.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 6acfb0eb41..40e1ff384a 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -1011,6 +1011,10 @@ void qemu_opts_del(QemuOpts *opts)
{
QemuOpt *opt;
+ if (opts == NULL) {
+ return;
+ }
+
for (;;) {
opt = QTAILQ_FIRST(&opts->head);
if (opt == NULL)