ia64/xen-unstable

changeset 14914:c1d3f4fbfacf

[qemu-dm] Check for null pointer in dma handler function pointer.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author Christian Limpach <Christian.Limpach@xensource.com>
date Tue Apr 24 17:02:10 2007 +0100 (2007-04-24)
parents 837d12d4d2d1
children 605aa81d7341
files tools/ioemu/hw/dma.c
line diff
     1.1 --- a/tools/ioemu/hw/dma.c	Tue Apr 24 17:02:09 2007 +0100
     1.2 +++ b/tools/ioemu/hw/dma.c	Tue Apr 24 17:02:10 2007 +0100
     1.3 @@ -340,6 +340,8 @@ static void channel_run (int ncont, int 
     1.4  #endif
     1.5  
     1.6      r = dma_controllers[ncont].regs + ichan;
     1.7 +    if (r->transfer_handler == NULL)
     1.8 +	return;
     1.9      n = r->transfer_handler (r->opaque, ichan + (ncont << 2),
    1.10                               r->now[COUNT], (r->base[COUNT] + 1) << ncont);
    1.11      r->now[COUNT] = n;