Changeset 33fc3ae in mainline


Ignore:
Timestamp:
2012-07-09T16:33:43Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a8435881, b4ca0a9c, f0348c8
Parents:
5e4f22b
Message:

Do not leak a fun_node_t reference in devman_add_function()
when trying to add the same function for the second time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/main.c

    r5e4f22b r33fc3ae  
    419419       
    420420        /* Check that function with same name is not there already. */
    421         if (find_fun_node_in_device(tree, pdev, fun_name) != NULL) {
     421        fun_node_t *tfun = find_fun_node_in_device(tree, pdev, fun_name);
     422        if (tfun) {
     423                fun_del_ref(tfun);      /* drop the new unwanted reference */
    422424                fibril_rwlock_write_unlock(&tree->rwlock);
    423425                dev_del_ref(pdev);
Note: See TracChangeset for help on using the changeset viewer.