Changeset 166a1f57 in mainline for uspace/srv/ns/task.c


Ignore:
Timestamp:
2013-04-12T15:13:36Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ed267bc
Parents:
bc4bf97
Message:

Fix use-after-free in ns

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ns/task.c

    rbc4bf97 r166a1f57  
    208208        sysarg_t retval;
    209209        task_exit_t texit;
     210        bool remove = false;
    210211       
    211212        ht_link_t *link = hash_table_find(&task_hash_table, &id);
     
    235236        }
    236237       
    237         hash_table_remove_item(&task_hash_table, link);
     238        remove = true;
    238239        retval = EOK;
    239240       
     
    243244                ipc_answer_2(callid, retval, texit, ht->retval);
    244245        }
     246        if (remove)
     247                hash_table_remove_item(&task_hash_table, link);
    245248}
    246249
Note: See TracChangeset for help on using the changeset viewer.