Changes in / [bd81386:e950803] in mainline


Ignore:
Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/block/libblock.c

    rbd81386 re950803  
    294294
    295295        /* Allow 1:1 or small-to-large block size translation */
    296         if (cache->lblock_size % devcon->pblock_size != 0)
     296        if (cache->lblock_size % devcon->pblock_size != 0) {
     297                free(cache);
    297298                return ENOTSUP;
     299        }
    298300
    299301        cache->blocks_cluster = cache->lblock_size / devcon->pblock_size;
     
    436438                        if (!b->data) {
    437439                                free(b);
     440                                b = NULL;
    438441                                goto recycle;
    439442                        }
     
    563566        assert(devcon);
    564567        assert(devcon->cache);
     568        assert(block->refcnt >= 1);
    565569
    566570        cache = devcon->cache;
     
    622626                        unsigned long key = block->lba;
    623627                        hash_table_remove(&cache->block_hash, &key, 1);
     628                        free(block->data);
    624629                        free(block);
    625                         free(block->data);
    626630                        cache->blocks_cached--;
    627631                        fibril_mutex_unlock(&cache->lock);
  • uspace/lib/c/generic/async.c

    rbd81386 re950803  
    294294}
    295295
    296 /** Connection hash table removal callback function.
    297  *
    298  * This function is called whenever a connection is removed from the connection
    299  * hash table.
    300  *
    301  * @param item Connection hash table item being removed.
    302  *
    303  */
    304296static void conn_remove(link_t *item)
    305297{
    306         free(hash_table_get_instance(item, connection_t, link));
    307298}
    308299
     
    647638                ipc_answer_0(FIBRIL_connection->close_callid, EOK);
    648639       
     640        free(FIBRIL_connection);
    649641        return 0;
    650642}
  • uspace/srv/devman/devman.c

    rbd81386 re950803  
    10631063        if (info != NULL) {
    10641064                memset(info, 0, sizeof(dev_class_info_t));
    1065                 list_initialize(&info->dev_classes);
    1066                 list_initialize(&info->devmap_link);
    1067                 list_initialize(&info->link);
     1065                link_initialize(&info->dev_classes);
     1066                link_initialize(&info->devmap_link);
     1067                link_initialize(&info->link);
    10681068        }
    10691069       
  • uspace/srv/devmap/devmap.c

    rbd81386 re950803  
    423423         */
    424424        list_initialize(&driver->devices);
    425         list_initialize(&(driver->drivers));
     425
     426        link_initialize(&driver->drivers);
    426427       
    427428        fibril_mutex_lock(&drivers_list_mutex);
     
    538539        }
    539540       
    540         list_initialize(&(device->devices));
    541         list_initialize(&(device->driver_devices));
     541        link_initialize(&device->devices);
     542        link_initialize(&device->driver_devices);
    542543       
    543544        /* Check that device is not already registered */
     
    942943        }
    943944       
    944         list_initialize(&(device->devices));
    945         list_initialize(&(device->driver_devices));
     945        link_initialize(&device->devices);
     946        link_initialize(&device->driver_devices);
    946947       
    947948        /* Get unique device handle */
  • uspace/srv/fs/devfs/devfs_ops.c

    rbd81386 re950803  
    130130{
    131131        devfs_node_t *node = (devfs_node_t *) pfn->data;
     132        int ret;
    132133       
    133134        if (node->handle == 0) {
     
    145146                               
    146147                                if (str_cmp(devs[pos].name, component) == 0) {
     148                                        ret = devfs_node_get_internal(rfn, DEV_HANDLE_NAMESPACE, devs[pos].handle);
    147149                                        free(devs);
    148                                         return devfs_node_get_internal(rfn, DEV_HANDLE_NAMESPACE, devs[pos].handle);
     150                                        return ret;
    149151                                }
    150152                        }
     
    162164                                for (pos = 0; pos < count; pos++) {
    163165                                        if (str_cmp(devs[pos].name, component) == 0) {
     166                                                ret = devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle);
    164167                                                free(devs);
    165                                                 return devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle);
     168                                                return ret;
    166169                                        }
    167170                                }
     
    184187                        for (pos = 0; pos < count; pos++) {
    185188                                if (str_cmp(devs[pos].name, component) == 0) {
     189                                        ret = devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle);
    186190                                        free(devs);
    187                                         return devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle);
     191                                        return ret;
    188192                                }
    189193                        }
Note: See TracChangeset for help on using the changeset viewer.