diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-21 09:20:31 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-11-22 11:11:37 +0100 |
commit | 410f9938127ad76da613b9af84151415598f719f (patch) | |
tree | 816c4b12dcf9d82174d2ffbbd22f933bbcdb4ca9 | |
parent | 099bb5e12f166ddca8588108838deb471bffc8a6 (diff) |
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)
-rw-r--r-- | basic/source/runtime/methods.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index ac4b9c4f250e..ddf210ecbcdf 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -3731,12 +3731,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 ); |