]> git.proxmox.com Git - 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)
committerKevin Wolf <kwolf@redhat.com>
Fri, 10 Aug 2012 08:25:12 +0000 (10:25 +0200)
commitea8d82a1ed72634f089ed1bccccd9c84cc1ab855
tree4d1ed2da96ceb799f1a5796c3f64171aba8b258f
parent61f52e06f0a21bab782f98ef3ea789aa6d0aa046
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>
dma-helpers.c
hw/ide/ahci.c