[LOGOFF]
[reactos.git] / reactos / base / applications / logoff / logoff.c
index 4913c83..ca57012 100644 (file)
@@ -30,6 +30,7 @@ static void PrintUsage() {
 
        if (AllocAndLoadString(&lpUsage, GetModuleHandle(NULL), IDS_USAGE)) {
                _putts(lpUsage);
+               LocalFree(lpUsage);
        }
 
 }
@@ -88,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;
                }
        }