Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
qemu-testsuite.15027
0266-ide-ahci-call-cleanup-function-in-a.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0266-ide-ahci-call-cleanup-function-in-a.patch of Package qemu-testsuite.15027
From 5ebae218835410f028a254729539cc661dced661 Mon Sep 17 00:00:00 2001 From: Li Qiang <liq3ea@gmail.com> Date: Wed, 15 Mar 2017 20:50:14 -0400 Subject: [PATCH] ide: ahci: call cleanup function in ahci unit This can avoid memory leak when hotunplug the ahci device. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn Signed-off-by: John Snow <jsnow@redhat.com> (cherry picked from commit d68f0f778e7f4fbd674627274267f269e40f0b04) [BSC#1042801 CVE-2017-9373] Signed-off-by: Bruce Rogers <brogers@suse.com> --- hw/ide/ahci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 488a69b415..b64b822917 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1352,6 +1352,18 @@ void ahci_init(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports) void ahci_uninit(AHCIState *s) { + int i, j; + + for (i = 0; i < s->ports; i++) { + AHCIDevice *ad = &s->dev[i]; + + for (j = 0; j < 2; j++) { + IDEState *s = &ad->port.ifs[j]; + + ide_exit(s); + } + } + g_free(s->dev); }
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