|
From: Andre R. <and...@us...> - 2006-03-16 22:12:46
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29420/Common/source Modified Files: shellsysverbs.c Log Message: Fix potential memory leak in unixshellcommandfunc case of sysfunctionvalue: Don't allocate return value until after we successfully obtained the input parameters. Index: shellsysverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellsysverbs.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shellsysverbs.c 10 Mar 2006 13:44:15 -0000 1.10 --- shellsysverbs.c 16 Mar 2006 22:12:32 -0000 1.11 *************** *** 665,674 **** Handle hcommand, hreturn; - newemptyhandle (&hreturn); - flnextparamislast = true; if (!getexempttextvalue (hparam1, 1, &hcommand)) return (false); if (!unixshellcall (hcommand, hreturn)) { --- 665,674 ---- Handle hcommand, hreturn; flnextparamislast = true; if (!getexempttextvalue (hparam1, 1, &hcommand)) return (false); + + newemptyhandle (&hreturn); if (!unixshellcall (hcommand, hreturn)) { |