Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset dca8fe5 in mainline


Ignore:
Timestamp:
2015-06-28T22:42:46Z (6 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
1329dc0
Parents:
fe97c5e
Message:

ehci: Fix memory leak in error path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/hc.c

    rfe97c5e rdca8fe5  
    130130        memcpy(code->cmds, ehci_irq_commands, sizeof(ehci_irq_commands));
    131131        ehci_caps_regs_t *caps = NULL;
     132
    132133        int ret = pio_enable_range(&regs, (void**)&caps);
    133134        if (ret != EOK) {
     135                free(code->ranges);
     136                free(code->cmds);
    134137                return ret;
    135138        }
     139
    136140        ehci_regs_t *registers =
    137141            (ehci_regs_t *)(RNGABSPTR(regs) + EHCI_RD8(caps->caplength));
Note: See TracChangeset for help on using the changeset viewer.