Changeset 55346870 in mainline


Ignore:
Timestamp:
2015-07-04T03:47:55Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eb34d8e
Parents:
b5f813c
Message:

uhci,ohci,ehci: Fix memory leaks in error paths.

Location:
uspace/drv/bus/usb
Files:
3 edited

Legend:

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

    rb5f813c r55346870  
    8080
    8181        const int ret = hc_init(instance, res, irq);
    82         if (ret == EOK)
     82        if (ret == EOK) {
    8383                hcd_set_implementation(hcd, instance, &ehci_hc_driver.ops);
     84        } else {
     85                free(instance);
     86        }
    8487        return ret;
    8588}
  • uspace/drv/bus/usb/ohci/main.c

    rb5f813c r55346870  
    7575
    7676        const int ret = hc_init(instance, res, irq);
    77         if (ret == EOK)
     77        if (ret == EOK) {
    7878                hcd_set_implementation(hcd, instance, &ohci_hc_driver.ops);
     79        } else {
     80                free(instance);
     81        }
    7982        return ret;
    8083}
  • uspace/drv/bus/usb/uhci/main.c

    rb5f813c r55346870  
    7676
    7777        const int ret = hc_init(instance, res, irq);
    78         if (ret == EOK)
     78        if (ret == EOK) {
    7979                hcd_set_implementation(hcd, instance, &uhci_hc_driver.ops);
     80        } else {
     81                free(instance);
     82        }
    8083        return ret;
    8184}
Note: See TracChangeset for help on using the changeset viewer.