Skip to content

Commit

Permalink
Fixes potential memory leak
Browse files Browse the repository at this point in the history
Adds missing `free` to dynamically allocated pointer on nvmem.c
  • Loading branch information
italo-sampaio committed Feb 5, 2025
1 parent 004d9b5 commit 223b22d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions firmware/src/hal/sgx/src/trusted/nvmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ bool nvmem_load() {
LOG("Error loading NVM block <%s>\n", nvm_blocks[i].key);
clear_blocks();
free(key);
free(tmp);
return false;
}
free(tmp);
Expand Down

0 comments on commit 223b22d

Please sign in to comment.