Author: pschweitzer
Date: Sun Apr 7 10:02:06 2013
New Revision: 58705
URL:
http://svn.reactos.org/svn/reactos?rev=58705&view=rev
Log:
[CMD]
Fix yet another memory leak
Modified:
trunk/reactos/base/shell/cmd/start.c
Modified: trunk/reactos/base/shell/cmd/start.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/start.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/start.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/start.c [iso-8859-1] Sun Apr 7 10:02:06 2013
@@ -193,9 +193,11 @@
{
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);