* grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Avoid NULL-pointer

dereference.
This commit is contained in:
David Volgyes 2011-06-23 20:28:04 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent a199a8cd1a
commit e98c83e910
2 changed files with 11 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2011-06-23 David Volgyes <dvolgyes>
* grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Avoid NULL-pointer
dereference.
2011-06-23 Vladimir Serbinenko <phcoder@gmail.com>
Fix spurious warning.

View file

@ -454,10 +454,12 @@ grub_ohci_pci_iter (grub_pci_device_t dev,
fail:
if (o)
grub_dma_free (o->td_chunk);
grub_dma_free (o->ed_bulk_chunk);
grub_dma_free (o->ed_ctrl_chunk);
grub_dma_free (o->hcca_chunk);
{
grub_dma_free (o->td_chunk);
grub_dma_free (o->ed_bulk_chunk);
grub_dma_free (o->ed_ctrl_chunk);
grub_dma_free (o->hcca_chunk);
}
grub_free (o);
return 0;