[LOGOFF]
[reactos.git] / reactos / base / applications / logoff / logoff.c
index 023386b..ca57012 100644 (file)
  * with Windows' system32\logoff.exe commandline application.
  */
 
-#define NDEBUG
 #include "precomp.h"
 
+#include <stdio.h>
+#include <tchar.h>
+
 //Commandline argument switches
 LPTSTR szRemoteServerName = NULL;
 BOOL bVerbose;
@@ -28,6 +30,7 @@ static void PrintUsage() {
 
        if (AllocAndLoadString(&lpUsage, GetModuleHandle(NULL), IDS_USAGE)) {
                _putts(lpUsage);
+               LocalFree(lpUsage);
        }
 
 }
@@ -86,8 +89,10 @@ BOOL ParseCommandLine(int argc, TCHAR *argv[])
                        }
                default:
                        //Invalid parameter detected
-                       if (AllocAndLoadString(&lpIllegalMsg, GetModuleHandle(NULL), IDS_ILLEGAL_PARAM))
-                       _putts(lpIllegalMsg);
+                       if (AllocAndLoadString(&lpIllegalMsg, GetModuleHandle(NULL), IDS_ILLEGAL_PARAM)) {
+                               _putts(lpIllegalMsg);
+                               LocalFree(lpIllegalMsg);
+                       }
                        return FALSE;
                }
        }