Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu-linux-user.6044
0218-serial-fix-memory-leak-in-serial-ex.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0218-serial-fix-memory-leak-in-serial-ex.patch of Package qemu-linux-user.6044
From c5262f05b008e66b2137c18251ed09044ed84dbc Mon Sep 17 00:00:00 2001 From: Li Qiang <liqiang6-s@360.cn> Date: Wed, 4 Jan 2017 00:43:16 -0800 Subject: [PATCH] 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> (cherry picked from commit 8409dc884a201bf74b30a9d232b6bbdd00cb7e2b) [BR: BSC#1021741 CVE-2017-5579] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/char/serial.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/char/serial.c b/hw/char/serial.c index 3998131af2..ebf507ba6b 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -869,6 +869,16 @@ void serial_realize_core(SerialState *s, Error **errp) void serial_exit_core(SerialState *s) { qemu_chr_add_handlers(s->chr, NULL, NULL, NULL, NULL); + + timer_del(s->modem_status_poll); + timer_free(s->modem_status_poll); + + timer_del(s->fifo_timeout_timer); + timer_free(s->fifo_timeout_timer); + + fifo8_destroy(&s->recv_fifo); + fifo8_destroy(&s->xmit_fifo); + qemu_unregister_reset(serial_reset, s); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor