mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 12:04:51 +00:00
don't try to free the ansi strings passed by the caller
svn path=/trunk/; revision=18390
This commit is contained in:
parent
af2ef3d685
commit
ea1ba0aefd
1 changed files with 0 additions and 6 deletions
|
@ -48,7 +48,6 @@ AbortSystemShutdownA(LPCSTR lpMachineName)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
rv = AbortSystemShutdownW(MachineNameW.Buffer);
|
rv = AbortSystemShutdownW(MachineNameW.Buffer);
|
||||||
RtlFreeAnsiString(&MachineNameA);
|
|
||||||
RtlFreeUnicodeString(&MachineNameW);
|
RtlFreeUnicodeString(&MachineNameW);
|
||||||
SetLastError(ERROR_SUCCESS);
|
SetLastError(ERROR_SUCCESS);
|
||||||
return rv;
|
return rv;
|
||||||
|
@ -110,7 +109,6 @@ InitiateSystemShutdownA(
|
||||||
RtlInitAnsiString(&MachineNameA, lpMachineName);
|
RtlInitAnsiString(&MachineNameA, lpMachineName);
|
||||||
Status = RtlAnsiStringToUnicodeString(&MachineNameW, &MachineNameA, TRUE);
|
Status = RtlAnsiStringToUnicodeString(&MachineNameW, &MachineNameA, TRUE);
|
||||||
if (STATUS_SUCCESS != Status) {
|
if (STATUS_SUCCESS != Status) {
|
||||||
RtlFreeAnsiString(&MachineNameA);
|
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastError(RtlNtStatusToDosError(Status));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -120,10 +118,8 @@ InitiateSystemShutdownA(
|
||||||
Status = RtlAnsiStringToUnicodeString(&MessageW, &MessageA, TRUE);
|
Status = RtlAnsiStringToUnicodeString(&MessageW, &MessageA, TRUE);
|
||||||
if (STATUS_SUCCESS != Status) {
|
if (STATUS_SUCCESS != Status) {
|
||||||
if (MachineNameW.Length) {
|
if (MachineNameW.Length) {
|
||||||
RtlFreeAnsiString(&MachineNameA);
|
|
||||||
RtlFreeUnicodeString(&MachineNameW);
|
RtlFreeUnicodeString(&MachineNameW);
|
||||||
}
|
}
|
||||||
RtlFreeAnsiString(&MessageA);
|
|
||||||
SetLastError(RtlNtStatusToDosError(Status));
|
SetLastError(RtlNtStatusToDosError(Status));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -136,11 +132,9 @@ InitiateSystemShutdownA(
|
||||||
bRebootAfterShutdown);
|
bRebootAfterShutdown);
|
||||||
LastError = GetLastError();
|
LastError = GetLastError();
|
||||||
if (lpMachineName) {
|
if (lpMachineName) {
|
||||||
RtlFreeAnsiString(&MachineNameA);
|
|
||||||
RtlFreeUnicodeString(&MachineNameW);
|
RtlFreeUnicodeString(&MachineNameW);
|
||||||
}
|
}
|
||||||
if (lpMessage) {
|
if (lpMessage) {
|
||||||
RtlFreeAnsiString(&MessageA);
|
|
||||||
RtlFreeUnicodeString(&MessageW);
|
RtlFreeUnicodeString(&MessageW);
|
||||||
}
|
}
|
||||||
SetLastError(LastError);
|
SetLastError(LastError);
|
||||||
|
|
Loading…
Reference in a new issue