Changeset 45a9cf4 in mainline for uspace/drv/bus/usb/uhci/pci.c


Ignore:
Timestamp:
2011-09-17T21:53:30Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
086290d, c5808b41, f1d6866
Parents:
dfa48b0d
Message:

uhci,ohci: Fix memory leak.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/pci.c

    rdfa48b0d r45a9cf4  
    6969
    7070        hw_resource_list_t hw_resources;
    71         int rc = hw_res_get_resource_list(parent_sess, &hw_resources);
     71        const int rc = hw_res_get_resource_list(parent_sess, &hw_resources);
     72        async_hangup(parent_sess);
    7273        if (rc != EOK) {
    73                 async_hangup(parent_sess);
    7474                return rc;
    7575        }
     
    7878        size_t io_size = 0;
    7979        bool io_found = false;
    80        
     80
    8181        int irq = 0;
    8282        bool irq_found = false;
    83        
     83
    8484        size_t i;
    8585        for (i = 0; i < hw_resources.count; i++) {
     
    102102                }
    103103        }
    104 
    105         async_hangup(parent_sess);
     104        free(hw_resources.resources);
    106105
    107106        if (!io_found || !irq_found)
Note: See TracChangeset for help on using the changeset viewer.