12.03.2015 06:59, arei.gong...@huawei.com wrote: > +++ b/ui/vnc.c > @@ -3698,8 +3698,13 @@ QemuOpts *vnc_parse_func(const char *str) > { > QemuOptsList *olist = qemu_find_opts("vnc"); > QemuOpts *opts = qemu_opts_parse(olist, str, 1); > - const char *id = qemu_opts_id(opts); > + const char *id = NULL;
Useless initializer. /mjt > + if (!opts) { > + return NULL; > + } > + > + id = qemu_opts_id(opts);