Skip to content

Commit

Permalink
Merge pull request #196 from flaviojs/fix-missing-unlock-tc_alloc
Browse files Browse the repository at this point in the history
Fix missing unlock in tc_alloc.
  • Loading branch information
grossmj authored Mar 28, 2024
2 parents dd901e1 + d5ff317 commit 19de09f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion unstable/tcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,10 @@ cpu_tc_t *tc_alloc(cpu_gen_t *cpu,m_uint64_t vaddr,m_uint32_t exec_state)
tc = tsg->tc_free_list;
tsg->tc_free_list = tc->sc_next;
} else {
if (!(tc = malloc(sizeof(*tc))))
if (!(tc = malloc(sizeof(*tc)))) {
TSG_UNLOCK(tsg);
return NULL;
}
}
TSG_UNLOCK(tsg);

Expand Down

0 comments on commit 19de09f

Please sign in to comment.