Changeset 9bddf37 in mainline
- Timestamp:
- 2010-01-26T19:03:36Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e056e820
- Parents:
- 88e870e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/tmpfs/tmpfs_ops.c
r88e870e r9bddf37 166 166 static void nodes_remove_callback(link_t *item) 167 167 { 168 tmpfs_node_t *nodep = hash_table_get_instance(item, tmpfs_node_t, 169 nh_link); 170 171 while (!list_empty(&nodep->cs_head)) { 172 tmpfs_dentry_t *dentryp = list_get_instance(nodep->cs_head.next, 173 tmpfs_dentry_t, link); 174 175 assert(nodep->type == TMPFS_DIRECTORY); 176 list_remove(&dentryp->link); 177 free(dentryp); 178 } 179 180 if (nodep->data) { 181 assert(nodep->type == TMPFS_FILE); 182 free(nodep->data); 183 } 184 free(nodep->bp); 185 free(nodep); 168 186 } 169 187 … … 317 335 hash_table_remove(&nodes, key, 2); 318 336 319 if ((nodep->type == TMPFS_FILE) && (nodep->data))320 free(nodep->data);321 free(nodep->bp);322 free(nodep);337 /* 338 * The nodes_remove_callback() function takes care of the actual 339 * resource deallocation. 340 */ 323 341 return EOK; 324 342 }
Note:
See TracChangeset
for help on using the changeset viewer.