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-23 08:13:14 +0000 |
commit | 79fa77cee657233a4dbc34e0c2922594de1c0f47 (patch) | |
tree | 8c35f562c7f0f35cf84198e491aa66aec3d066ba /basic | |
parent | 220bab1d2f7c428b860adb3ae5a09ff3cbc1891e (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)
Reviewed-on: https://gerrit.libreoffice.org/13016
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'basic')
-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 c1b688903e92..f27e77146407 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 ); |