summary refs log tree commit diff stats
path: root/docs/defs.rst.inc
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2021-03-24 09:41:30 +0100
committerThomas Huth <thuth@redhat.com>2021-04-01 14:28:39 +0200
commitbd74ecd1c39ca7699819ca5cf39c07f50c5f8d5d (patch)
treeddc1f87da189763860efe6f84b1b0864372f3625 /docs/defs.rst.inc
parent2d53d0c77f95433a70f89f837f7ee768d79ac3cc (diff)
downloadfocaccia-qemu-bd74ecd1c39ca7699819ca5cf39c07f50c5f8d5d.tar.gz
focaccia-qemu-bd74ecd1c39ca7699819ca5cf39c07f50c5f8d5d.zip
qom: Fix default values in help
Output of default values in device help is broken:

    $ ./qemu-system-x86_64 -S -display none -monitor stdio
    QEMU 5.2.50 monitor - type 'help' for more information
    (qemu) device_add pvpanic,help
    pvpanic options:
      events=<uint8>         -  (default: (null))
      ioport=<uint16>        -  (default: (null))
      pvpanic[0]=<child<qemu:memory-region>>

The "(null)" is glibc printing a null pointer.  Other systems crash
instead.  Having a help request crash a running VM can really spoil
your day.

Root cause is a botched replacement of qstring_free() by
g_string_free(): to get the string back, we need to pass true to the
former, but false to the latter.  Fix the argument.

Fixes: eab3a4678b07267c39e7290a6e9e7690b1d2a521
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210324084130.3986072-1-armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'docs/defs.rst.inc')
0 files changed, 0 insertions, 0 deletions