Skip to content

Commit

Permalink
Fix memory leak in zrandom.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ashamedbit committed Feb 9, 2024
1 parent bb3b861 commit a30a518
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zrandom.c
Original file line number Diff line number Diff line change
Expand Up @@ -2679,6 +2679,9 @@ zsetrandom(CONST RANDOM *state)
*/
if (state != NULL) {
p_blum = randomcopy(state);
if (blum_initialized == true) {
randomfree(&blum);
}
blum = *p_blum;
free(p_blum);
}
Expand Down

0 comments on commit a30a518

Please sign in to comment.