]> git.proxmox.com Git - mirror_qemu.git/commit - monitor.c
monitor: Cleanup mon->outbuf on write error
authorStratos Psomadakis <psomas@grnet.gr>
Mon, 27 Jan 2014 10:30:15 +0000 (12:30 +0200)
committerLuiz Capitulino <lcapitulino@redhat.com>
Tue, 28 Jan 2014 17:47:12 +0000 (12:47 -0500)
commit056f49ff2cf645dc484956b00b65a3aa18a1a9a3
treef2dc17491a3b8d5be184b3bd396aa9e919a12da9
parent57d3e1b3f52d07d215ed96df946ee01f8d9f9526
monitor: Cleanup mon->outbuf on write error

In case monitor_flush() fails to write the contents of mon->outbuf to
the output device, mon->outbuf is not cleaned up properly. Check the
return code of the qemu_chr_fe_write() function and cleanup the outbuf
if it fails.

References: http://lists.nongnu.org/archive/html/qemu-devel/2014-01/msg02890.html

Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor.c