Skip to content

Commit

Permalink
libsel4utils: fix use of uninitialized value
Browse files Browse the repository at this point in the history
thread_created maybe uninitialized if failure before initialize

Signed-off-by: chao an <[email protected]>
  • Loading branch information
anchao committed Sep 11, 2023
1 parent 1f03365 commit 5993b88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libsel4utils/src/irq_server/irq_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ static void _irq_thread_entry(irq_server_thread_t *my_thread_info, ps_irq_ops_t
thread_id_t irq_server_thread_new(irq_server_t *irq_server, seL4_CPtr provided_ntfn,
seL4_Word usable_mask, thread_id_t id_hint)
{
bool thread_created = false;
int error;

irq_server_thread_t *new_thread = NULL;
Expand Down Expand Up @@ -227,7 +228,7 @@ thread_id_t irq_server_thread_new(irq_server_t *irq_server, seL4_CPtr provided_n
goto fail;
}

bool thread_created = true;
thread_created = true;

/* Start the thread */
error = sel4utils_start_thread(&new_thread->thread, (void *)_irq_thread_entry,
Expand Down

0 comments on commit 5993b88

Please sign in to comment.