]> git.proxmox.com Git - qemu.git/commitdiff
ich/ahci: fix uninitialized memory use
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 15 May 2011 16:27:34 +0000 (19:27 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 16 May 2011 11:23:45 +0000 (14:23 +0300)
The commit 667bb59d2358daeef179583c944becba3f1f9680
uses d->ahci.mem before it is initialized by
ahci_init(). Fix this by calling ahci_init() first thing
so that it's safe to use all fields in the ahci state struct.

Reported-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Reported-by: Jan Kiszka <jan.kiszka@web.de>
Tested-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

No differences found