Fix the _rest_ of the Windows compile warnings. (ahem)
[u/mdw/putty] / windows / winstore.c
index 00049b7..aae5a4c 100644 (file)
@@ -699,8 +699,8 @@ static int transform_jumplist_registry
         ret = RegSetValueEx(pjumplist_key, reg_jumplist_value, 0, REG_MULTI_SZ,
                             new_value, piterator_new - new_value);
 
+        sfree(old_value);
         old_value = new_value;
-        sfree(new_value);
     } else
         ret = ERROR_SUCCESS;
 
@@ -780,6 +780,12 @@ void cleanup_all(void)
     access_random_seed(DEL);
 
     /* ------------------------------------------------------------
+     * Ask Windows to delete any jump list information associated
+     * with this installation of PuTTY.
+     */
+    clear_jumplist();
+
+    /* ------------------------------------------------------------
      * Destroy all registry information associated with PuTTY.
      */