hw/ide/macio: Fix segfault caused by NULL DMAContext*
commitd688e5239aad2a1f991147974832ce026f78c1a3
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 20 Nov 2012 08:16:51 +0000 (20 08:16 +0000)
committerAlexander Graf <agraf@suse.de>
Mon, 26 Nov 2012 18:53:26 +0000 (26 19:53 +0100)
tree64e7ae9da6f13f58601d5abeccee8f97e243948a
parentcab1e8f3e37d8e883c270e3afd9c7c1c18332f0e
hw/ide/macio: Fix segfault caused by NULL DMAContext*

Pass qemu_sglist_init the global dma_context_memory rather than a NULL
pointer; this fixes a segfault in dma_memory_map() when the guest
starts using DMA.

Reported-by: Amadeusz Sławiński <amade@asmblr.net>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ide/macio.c