Skip to content

Commit

Permalink
Fix NULL dereference in mips64_get_idling_pc.
Browse files Browse the repository at this point in the history
This code was missing from #220
  • Loading branch information
flaviojs committed Apr 3, 2024
1 parent 5135a10 commit 20166f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unstable/mips64.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ int mips64_get_idling_pc(cpu_gen_t *cpu)
printf("\nPlease wait while gathering statistics...\n");

pc_hash = calloc(IDLE_HASH_SIZE,sizeof(struct mips64_idle_pc_hash *));
if (pc_hash == NULL) {
printf("Out of memory.");
return(-1);
}

/* Disable IRQ */
mcpu->irq_disable = TRUE;
Expand Down

0 comments on commit 20166f8

Please sign in to comment.