cmd: Fix some leaks (coverity).
This commit is contained in:
parent
b6b7eb050f
commit
5108b18940
|
@ -1403,6 +1403,7 @@ void WCMD_echo (const WCHAR *args)
|
||||||
&& origcommand[0]!=';') {
|
&& origcommand[0]!=';') {
|
||||||
if (echo_mode) WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), onW);
|
if (echo_mode) WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), onW);
|
||||||
else WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), offW);
|
else WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), offW);
|
||||||
|
HeapFree(GetProcessHeap(), 0, trimmed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2930,7 +2931,7 @@ void WCMD_endlocal (void) {
|
||||||
|
|
||||||
/* delete the current environment, totally */
|
/* delete the current environment, totally */
|
||||||
env = GetEnvironmentStringsW ();
|
env = GetEnvironmentStringsW ();
|
||||||
old = WCMD_dupenv (GetEnvironmentStringsW ());
|
old = WCMD_dupenv (env);
|
||||||
len = 0;
|
len = 0;
|
||||||
while (old[len]) {
|
while (old[len]) {
|
||||||
n = strlenW(&old[len]) + 1;
|
n = strlenW(&old[len]) + 1;
|
||||||
|
|
Loading…
Reference in New Issue