* grub-core/bus/usb/uhci.c (grub_uhci_setup_transfer): Fix possible

NULL pointer dereference.
This commit is contained in:
Szymon Janc 2011-10-19 23:11:48 +02:00
parent de9c615e5c
commit fcf1d67219
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2011-10-19 Szymon Janc <szymon@janc.net.pl>
* grub-core/bus/usb/uhci.c (grub_uhci_setup_transfer): Fix possible
NULL pointer dereference.
2011-10-19 Vladimir Serbinenko <phcoder@gmail.com>
Removed unused GRUB_BOOT_VERSION. Check for kernel version is better

View file

@ -544,8 +544,11 @@ grub_uhci_setup_transfer (grub_usb_controller_t dev,
{
grub_size_t actual = 0;
/* Terminate and free. */
td_prev->linkptr2 = 0;
td_prev->linkptr = 1;
if (td_prev)
{
td_prev->linkptr2 = 0;
td_prev->linkptr = 1;
}
if (cdata->td_first)
grub_free_queue (u, cdata->qh, cdata->td_first, NULL, &actual);