Changes in / [e950803:bd81386] in mainline
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/libblock.c
re950803 rbd81386 294 294 295 295 /* Allow 1:1 or small-to-large block size translation */ 296 if (cache->lblock_size % devcon->pblock_size != 0) { 297 free(cache); 296 if (cache->lblock_size % devcon->pblock_size != 0) 298 297 return ENOTSUP; 299 }300 298 301 299 cache->blocks_cluster = cache->lblock_size / devcon->pblock_size; … … 438 436 if (!b->data) { 439 437 free(b); 440 b = NULL;441 438 goto recycle; 442 439 } … … 566 563 assert(devcon); 567 564 assert(devcon->cache); 568 assert(block->refcnt >= 1);569 565 570 566 cache = devcon->cache; … … 626 622 unsigned long key = block->lba; 627 623 hash_table_remove(&cache->block_hash, &key, 1); 624 free(block); 628 625 free(block->data); 629 free(block);630 626 cache->blocks_cached--; 631 627 fibril_mutex_unlock(&cache->lock); -
uspace/lib/c/generic/async.c
re950803 rbd81386 294 294 } 295 295 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 */ 296 304 static void conn_remove(link_t *item) 297 305 { 306 free(hash_table_get_instance(item, connection_t, link)); 298 307 } 299 308 … … 638 647 ipc_answer_0(FIBRIL_connection->close_callid, EOK); 639 648 640 free(FIBRIL_connection);641 649 return 0; 642 650 } -
uspace/srv/devman/devman.c
re950803 rbd81386 1063 1063 if (info != NULL) { 1064 1064 memset(info, 0, sizeof(dev_class_info_t)); 1065 li nk_initialize(&info->dev_classes);1066 li nk_initialize(&info->devmap_link);1067 li nk_initialize(&info->link);1065 list_initialize(&info->dev_classes); 1066 list_initialize(&info->devmap_link); 1067 list_initialize(&info->link); 1068 1068 } 1069 1069 -
uspace/srv/devmap/devmap.c
re950803 rbd81386 423 423 */ 424 424 list_initialize(&driver->devices); 425 426 link_initialize(&driver->drivers); 425 list_initialize(&(driver->drivers)); 427 426 428 427 fibril_mutex_lock(&drivers_list_mutex); … … 539 538 } 540 539 541 li nk_initialize(&device->devices);542 li nk_initialize(&device->driver_devices);540 list_initialize(&(device->devices)); 541 list_initialize(&(device->driver_devices)); 543 542 544 543 /* Check that device is not already registered */ … … 943 942 } 944 943 945 li nk_initialize(&device->devices);946 li nk_initialize(&device->driver_devices);944 list_initialize(&(device->devices)); 945 list_initialize(&(device->driver_devices)); 947 946 948 947 /* Get unique device handle */ -
uspace/srv/fs/devfs/devfs_ops.c
re950803 rbd81386 130 130 { 131 131 devfs_node_t *node = (devfs_node_t *) pfn->data; 132 int ret;133 132 134 133 if (node->handle == 0) { … … 146 145 147 146 if (str_cmp(devs[pos].name, component) == 0) { 148 ret = devfs_node_get_internal(rfn, DEV_HANDLE_NAMESPACE, devs[pos].handle);149 147 free(devs); 150 return ret;148 return devfs_node_get_internal(rfn, DEV_HANDLE_NAMESPACE, devs[pos].handle); 151 149 } 152 150 } … … 164 162 for (pos = 0; pos < count; pos++) { 165 163 if (str_cmp(devs[pos].name, component) == 0) { 166 ret = devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle);167 164 free(devs); 168 return ret;165 return devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle); 169 166 } 170 167 } … … 187 184 for (pos = 0; pos < count; pos++) { 188 185 if (str_cmp(devs[pos].name, component) == 0) { 189 ret = devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle);190 186 free(devs); 191 return ret;187 return devfs_node_get_internal(rfn, DEV_HANDLE_DEVICE, devs[pos].handle); 192 188 } 193 189 }
Note:
See TracChangeset
for help on using the changeset viewer.