Changeset 18092dd3 in mainline for uspace/drv/bus/usb/xhci/device.c


Ignore:
Timestamp:
2018-01-29T13:23:28Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7bdfcaf
Parents:
702729e
Message:

usb hc: fixed leaking reference in enumeration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/device.c

    r702729e r18092dd3  
    8181        usb_log_debug("Obtained slot ID: %u.", dev->slot_id);
    8282
     83        /* Temporary reference */
    8384        endpoint_t *ep0_base;
    8485        if ((err = bus_endpoint_add(&dev->base, &ep0_initial_desc, &ep0_base)))
     
    9394                goto err_added;
    9495
     96        /* Temporary reference */
     97        endpoint_del_ref(ep0_base);
     98
    9599        return EOK;
    96100
    97101err_added:
    98         /* Bus reference */
     102        bus_endpoint_remove(ep0_base);
     103        /* Temporary reference */
    99104        endpoint_del_ref(ep0_base);
    100         dev->base.endpoints[0] = NULL;
    101105err_slot:
    102106        hc_disable_slot(dev);
Note: See TracChangeset for help on using the changeset viewer.