[1/2] qemu-option: avoid segfault if QemuOptsList == NULL

Submitted by Peter Lieven on March 19, 2013, 8:19 a.m.

Details

Message ID 1363681158-26122-2-git-send-email-pl@kamp.de
State New
Headers show

Commit Message

Peter Lieven March 19, 2013, 8:19 a.m.
Signed-off-by: Peter Lieven <pl@kamp.de>
---
 util/qemu-option.c |    1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/util/qemu-option.c b/util/qemu-option.c
index 8b74bf1..24479d2 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -938,6 +938,7 @@  static QemuOpts *opts_parse(QemuOptsList *list, const char *params,
     QemuOpts *opts;
     Error *local_err = NULL;
 
+    assert(list != NULL);
     assert(!permit_abbrev || list->implied_opt_name);
     firstname = permit_abbrev ? list->implied_opt_name : NULL;