mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:13:01 +00:00
[CMD]
Fix yet another memory leak svn path=/trunk/; revision=58705
This commit is contained in:
parent
149e272b30
commit
54dce4f7ad
1 changed files with 2 additions and 0 deletions
|
@ -193,9 +193,11 @@ INT cmd_start (LPTSTR Rest)
|
||||||
{
|
{
|
||||||
if (size > MAX_PATH)
|
if (size > MAX_PATH)
|
||||||
{
|
{
|
||||||
|
LPTSTR Oldcomspec = comspec;
|
||||||
comspec = cmd_realloc(comspec,size * sizeof(TCHAR) );
|
comspec = cmd_realloc(comspec,size * sizeof(TCHAR) );
|
||||||
if (comspec==NULL)
|
if (comspec==NULL)
|
||||||
{
|
{
|
||||||
|
cmd_free(Oldcomspec);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
size = GetEnvironmentVariable (_T("COMSPEC"), comspec, size);
|
size = GetEnvironmentVariable (_T("COMSPEC"), comspec, size);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue