diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2016-02-19 09:23:03 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:45:30 -0600 |
commit | df2508b0085ea9d3a6fc0a796b431e696932c33d (patch) | |
tree | 803fcdc6b1c6921317b0d621e375a49496d27435 /ui/spice-display.c | |
parent | f79aed9d7c6f53ed511488ec95383e8ace4cb3b3 (diff) | |
download | hqemu-df2508b0085ea9d3a6fc0a796b431e696932c33d.zip hqemu-df2508b0085ea9d3a6fc0a796b431e696932c33d.tar.gz |
spice: init dcl before registering qxl interface
Without this spice might callback into qemu before ssd->dcl.con is
initialized, resulting in a segfault due to NULL pointer dereference.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'ui/spice-display.c')
-rw-r--r-- | ui/spice-display.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/spice-display.c b/ui/spice-display.c index 8a5b325..cdbc78d 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -775,14 +775,14 @@ static void qemu_spice_display_init_one(QemuConsole *con) qemu_spice_display_init_common(ssd); + ssd->dcl.ops = &display_listener_ops; + ssd->dcl.con = con; + ssd->qxl.base.sif = &dpy_interface.base; qemu_spice_add_display_interface(&ssd->qxl, con); assert(ssd->worker); - qemu_spice_create_host_memslot(ssd); - ssd->dcl.ops = &display_listener_ops; - ssd->dcl.con = con; register_displaychangelistener(&ssd->dcl); } |