1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

random_ref() should always increment the reference count.

No current PuTTY utility was calling random_ref more than once per run
(ssh.c and the two main PuTTYgen programs call it once each), but if
one ever does (or if derived code does), it will want the reference
count to actually work sensibly.

[originally from svn r10049]
This commit is contained in:
Simon Tatham 2013-10-09 18:38:35 +00:00
parent 2ca13fa995
commit ab2ddd1772

View File

@ -288,14 +288,13 @@ void random_ref(void)
if (!random_active) {
memset(&pool, 0, sizeof(pool)); /* just to start with */
random_active++;
noise_get_heavy(random_add_heavynoise_bitbybit);
random_stir();
next_noise_collection =
schedule_timer(NOISE_REGULAR_INTERVAL, random_timer, &pool);
}
random_active++;
}
void random_unref(void)