Author: akhaldi Date: Fri Oct 31 10:24:48 2014 New Revision: 65137
URL: http://svn.reactos.org/svn/reactos?rev=65137&view=rev Log: [LOGOFF] * LocalFree should only be executed if AllocAndLoadString() succeeds. Spotted by Thomas Faber.
Modified: trunk/reactos/base/applications/logoff/logoff.c
Modified: trunk/reactos/base/applications/logoff/logoff.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/logoff/lo... ============================================================================== --- trunk/reactos/base/applications/logoff/logoff.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/logoff/logoff.c [iso-8859-1] Fri Oct 31 10:24:48 2014 @@ -89,9 +89,10 @@ } default: //Invalid parameter detected - if (AllocAndLoadString(&lpIllegalMsg, GetModuleHandle(NULL), IDS_ILLEGAL_PARAM)) - _putts(lpIllegalMsg); - LocalFree(lpIllegalMsg); + if (AllocAndLoadString(&lpIllegalMsg, GetModuleHandle(NULL), IDS_ILLEGAL_PARAM)) { + _putts(lpIllegalMsg); + LocalFree(lpIllegalMsg); + } return FALSE; } }