Revision 487414f1 hw/etraxfs_eth.c

b/hw/etraxfs_eth.c
564 564
	qemu_check_nic_model(nd, "fseth");
565 565

  
566 566
	dma = qemu_mallocz(sizeof *dma * 2);
567
	if (!dma)
568
		return NULL;
569 567

  
570 568
	eth = qemu_mallocz(sizeof *eth);
571
	if (!eth)
572
		goto err;
573 569

  
574 570
	dma[0].client.push = eth_tx_push;
575 571
	dma[0].client.opaque = eth;
......
595 591
	eth->vc->link_status_changed = eth_set_link;
596 592

  
597 593
	return dma;
598
  err:
599
	qemu_free(eth);
600
	qemu_free(dma);
601
	return NULL;
602 594
}

Also available in: Unified diff