--- a/terminalsecurity/SCP/SCPClient/src/SCPParamObject.cpp Fri Sep 03 22:35:56 2010 +0530
+++ b/terminalsecurity/SCP/SCPClient/src/SCPParamObject.cpp Fri Sep 17 19:59:15 2010 +0530
@@ -214,7 +214,7 @@
iParamValues.Remove( i );
delete tmpValue;
- iParamValues.Insert( newValue, i );
+ iParamValues.InsertL( newValue, i );
isNewParam = EFalse;
}
}
@@ -222,8 +222,24 @@
if ( isNewParam )
{
// Create a new value
- iParamIDs.Append( aParamID );
- iParamValues.Append( newValue );
+ TInt err = KErrNone;
+ TRAP(err, iParamIDs.AppendL( aParamID ));
+ if(err != KErrNone)
+ {
+ delete newValue;
+ ret = err;
+ }
+ else
+ {
+ TRAP(err, iParamValues.AppendL( newValue ));
+ if(err != KErrNone)
+ {
+ delete newValue;
+ //Rollback append.
+ iParamIDs.Remove(iParamIDs.Count()-1);
+ ret = err;
+ }
+ }
}
return ret;