]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/window.c
Make get_user_sid() return the cached copy if one already exists.
[PuTTY.git] / windows / window.c
index ec7e17190a8fae28a88e1b2fcca30dd48ad5831a..03325054bf79983bd3bcc463bb5d41b2b334679d 100644 (file)
@@ -398,10 +398,12 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
 #ifndef UNPROTECT
         char *error = NULL;
         if (! setprocessacl(error)) {
-           logevent(NULL, "Could not restrict process ACL: %s",
-                    error);
+            char *message = dupprintf("Could not restrict process ACL: %s",
+                                      error);
+           logevent(NULL, message);
+            sfree(message);
+           sfree(error);
        }
-        sfree(error);
 #endif
     }
     /*