[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - basic/source

Caolán McNamara caolanm at redhat.com
Sun Nov 23 00:13:35 PST 2014


 basic/source/runtime/methods.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 79fa77cee657233a4dbc34e0c2922594de1c0f47
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 21 09:20:31 2014 +0000

    busted loop condition and coverity#1255390 Resource leak
    
    regression from
    
    commit 119873328acd70ca3569c21a0b1fe36277e8bf4c
    Date:   Thu Oct 21 15:34:02 2010 -0500
        convert vos/process.hxx and related API
    
    Change-Id: I36527a4f0109105b9853a79773b4c92f9bc4e902
    (cherry picked from commit ecc56da366960b642d0a7da1b4a47245243252f8)
    Reviewed-on: https://gerrit.libreoffice.org/13016
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index c1b6889..f27e771 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3716,12 +3716,13 @@ RTLFUNC(Shell)
             osl_freeProcessHandle( pApp );
         }
 
-        for(int j = 0; i < nParamCount; i++)
+        for(int j = 0; j < nParamCount; ++j)
         {
             rtl_uString_release(pParamList[j]);
-            pParamList[j] = NULL;
         }
 
+        delete [] pParamList;
+
         if( !bSucc )
         {
             StarBASIC::Error( SbERR_FILE_NOT_FOUND );


More information about the Libreoffice-commits mailing list