]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - noise.c
Fix a couple of stupid typos in the session-saving code.
[PuTTY.git] / noise.c
diff --git a/noise.c b/noise.c
index a094d25e4dcc03ca9b43341e9e594fef6b21f28f..a9dfa8920c41671b172ddb35d8790e4a254f70af 100644 (file)
--- a/noise.c
+++ b/noise.c
@@ -40,6 +40,8 @@ void noise_get_heavy(void (*func) (void *, int))
     }
 
     read_random_seed(func);
+    /* Update the seed immediately, in case another instance uses it. */
+    random_save_seed();
 
     gsps = NULL;
     mod = GetModuleHandle("KERNEL32");
@@ -56,6 +58,7 @@ void random_save_seed(void)
     if (random_active) {
        random_get_savedata(&data, &len);
        write_random_seed(data, len);
+       sfree(data);
     }
 }
 
@@ -129,7 +132,7 @@ void noise_regular(void)
  * counter to the noise pool. It gets the scan code or mouse
  * position passed in.
  */
-void noise_ultralight(DWORD data)
+void noise_ultralight(unsigned long data)
 {
     DWORD wintime;
     LARGE_INTEGER perftime;