Fix yet another memory leak

svn path=/trunk/; revision=58705
This commit is contained in:
Pierre Schweitzer 2013-04-07 10:02:06 +00:00
parent 149e272b30
commit 54dce4f7ad

View file

@ -193,9 +193,11 @@ INT cmd_start (LPTSTR Rest)
{
if (size > MAX_PATH)
{
LPTSTR Oldcomspec = comspec;
comspec = cmd_realloc(comspec,size * sizeof(TCHAR) );
if (comspec==NULL)
{
cmd_free(Oldcomspec);
return 1;
}
size = GetEnvironmentVariable (_T("COMSPEC"), comspec, size);