]> git.ipfire.org Git - thirdparty/qemu.git/commit
ahci: Fix sglist memleak in ahci_dma_rw_buf()
authorJason Baron <jbaron@redhat.com>
Fri, 3 Aug 2012 19:57:10 +0000 (15:57 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 21 Aug 2012 20:36:40 +0000 (15:36 -0500)
commitc094d3d8181f3193e402b49361327040c5725d79
treee12a1bb469e051b5f466a038d94aa5f623da6e47
parenta47343957489b9fafdb438351e8fa9d58d7fd30b
ahci: Fix sglist memleak in ahci_dma_rw_buf()

I noticed that in hw/ide/ahci:ahci_dma_rw_buf() we do not free the sglist. Thus,
I've added a call to qemu_sglist_destroy() to fix this memory leak.

In addition, I've adeed a call in qemu_sglist_destroy() to 0 all of the sglist
fields, in case there is some other codepath that tries to free the sglist.

Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit ea8d82a1ed72634f089ed1bccccd9c84cc1ab855)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
dma-helpers.c
hw/ide/ahci.c