]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/bus/usb/ohci.c (grub_ohci_pci_iter): Avoid NULL-pointer
authorDavid Volgyes <dvolgyes>
Thu, 23 Jun 2011 18:28:04 +0000 (20:28 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 23 Jun 2011 18:28:04 +0000 (20:28 +0200)
dereference.

ChangeLog
grub-core/bus/usb/ohci.c

index a455d9b6b414aecfcfc7264459e2e06799d18987..ad72c8da212b8f2fbe8dfdb0eca0a5484e605587 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index df0d0f4afe763fafe0fa3298361e56fd177c8a21..7e8eaaac246b11f85c776a9f03e9996e3c97992b 100644 (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;