Commit 755097d
committed
Track if RNG seed FD was opened and only close it if it was already open. This fixes the case where wc_FreeRng is called when _InitRng was not called on the RNG. Since the FD value defaults to 0 before _InitRng was called, and 0 is potentially a valid FD, it was being closed.
1 parent 0420c94 commit 755097d
2 files changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
898 | | - | |
| 898 | + | |
| 899 | + | |
899 | 900 | | |
900 | 901 | | |
901 | 902 | | |
| |||
1378 | 1379 | | |
1379 | 1380 | | |
1380 | 1381 | | |
1381 | | - | |
| 1382 | + | |
1382 | 1383 | | |
1383 | 1384 | | |
| 1385 | + | |
1384 | 1386 | | |
1385 | 1387 | | |
1386 | 1388 | | |
| |||
3564 | 3566 | | |
3565 | 3567 | | |
3566 | 3568 | | |
3567 | | - | |
| 3569 | + | |
3568 | 3570 | | |
3569 | 3571 | | |
3570 | 3572 | | |
| |||
3579 | 3581 | | |
3580 | 3582 | | |
3581 | 3583 | | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
3582 | 3590 | | |
3583 | 3591 | | |
3584 | 3592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
0 commit comments