提交 4782183d 编写于 作者: C Chunyan Liu 提交者: Stefan Hajnoczi

QemuOpts: check NULL input for qemu_opts_del

To simplify later using of qemu_opts_del, accept NULL input.
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NLeandro Dorileo <l@dorileo.org>
Signed-off-by: NChunyan Liu <cyliu@suse.com>
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 a1097a26
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册