serial: fix memory leak in serial exit
commit8409dc884a201bf74b30a9d232b6bbdd00cb7e2b
authorLi Qiang <liqiang6-s@360.cn>
Wed, 4 Jan 2017 08:43:16 +0000 (4 00:43 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 16 Jan 2017 16:52:35 +0000 (16 17:52 +0100)
treee15cc272c850bffad649624e15cdf42a9d512d16
parent1f8af0d186abf9ef775a74d41bf2852ed8d59b63
serial: fix memory leak in serial exit

The serial_exit_core function doesn't free some resources.
This can lead memory leak when hotplug and unplug. This
patch avoid this.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-Id: <586cb5ab.f31d9d0a.38ac3.acf2@mx.google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/char/serial.c