From ea1ba0aefd4fe90200b98bbb61a5532ce35a017c Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Sun, 9 Oct 2005 22:35:41 +0000 Subject: [PATCH] don't try to free the ansi strings passed by the caller svn path=/trunk/; revision=18390 --- reactos/lib/advapi32/misc/shutdown.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/reactos/lib/advapi32/misc/shutdown.c b/reactos/lib/advapi32/misc/shutdown.c index 7b5121461dd..c43c555abea 100644 --- a/reactos/lib/advapi32/misc/shutdown.c +++ b/reactos/lib/advapi32/misc/shutdown.c @@ -48,7 +48,6 @@ AbortSystemShutdownA(LPCSTR lpMachineName) return FALSE; } rv = AbortSystemShutdownW(MachineNameW.Buffer); - RtlFreeAnsiString(&MachineNameA); RtlFreeUnicodeString(&MachineNameW); SetLastError(ERROR_SUCCESS); return rv; @@ -110,7 +109,6 @@ InitiateSystemShutdownA( RtlInitAnsiString(&MachineNameA, lpMachineName); Status = RtlAnsiStringToUnicodeString(&MachineNameW, &MachineNameA, TRUE); if (STATUS_SUCCESS != Status) { - RtlFreeAnsiString(&MachineNameA); SetLastError(RtlNtStatusToDosError(Status)); return FALSE; } @@ -120,10 +118,8 @@ InitiateSystemShutdownA( Status = RtlAnsiStringToUnicodeString(&MessageW, &MessageA, TRUE); if (STATUS_SUCCESS != Status) { if (MachineNameW.Length) { - RtlFreeAnsiString(&MachineNameA); RtlFreeUnicodeString(&MachineNameW); } - RtlFreeAnsiString(&MessageA); SetLastError(RtlNtStatusToDosError(Status)); return FALSE; } @@ -136,11 +132,9 @@ InitiateSystemShutdownA( bRebootAfterShutdown); LastError = GetLastError(); if (lpMachineName) { - RtlFreeAnsiString(&MachineNameA); RtlFreeUnicodeString(&MachineNameW); } if (lpMessage) { - RtlFreeAnsiString(&MessageA); RtlFreeUnicodeString(&MessageW); } SetLastError(LastError);