console: Abort on property access errors
authorKirill Batuzov <batuzovk@ispras.ru>
Thu, 24 Apr 2014 14:15:58 +0000 (18:15 +0400)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 26 May 2014 06:41:02 +0000 (08:41 +0200)
commitafff2b15e89ac81c113f2ebfd729aaa02b40edb6
tree6da59d3248b8aabc4babee0a0d5563ce260aadd9
parent178ac111bca16c08a79b2609ebdc75197bea976a
console: Abort on property access errors

All defined properties of QemuConsole are mandatory and no access to them
should fail. Nevertheless not checking returned errors is bad because in case
of unexpected failure it will hide the bug and cause a memory leak.

Abort in case of unexpected property access errors. This change exposed a bug
where an attempt was made to write to a read-only property "head".

Set "head" property's value at creation time and do not attempt to change it
later. This fixes the bug mentioned above.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/console.c