diff -r f3d01c9dd099 -r ed15378514e0 libraries/iosrv/client/command_base.cpp --- a/libraries/iosrv/client/command_base.cpp Wed Sep 22 10:56:39 2010 +0100 +++ b/libraries/iosrv/client/command_base.cpp Wed Sep 22 17:40:33 2010 +0100 @@ -416,6 +416,7 @@ { *(TInt*)iValue = value; } + delete aString; // Because the command class knows nothing about how enums are converted from HBufCs in this case, it cannot be responsible for deleting the HBufC like it would be for a normal string argument. So we delete it here. iIsSet = ETrue; } else // string @@ -2392,8 +2393,8 @@ case KValueTypeEnum: { HBufC* string = ReadStringLC(aLex, EDisallowLeadingHyphen); - aValue.SetValueL(string); - CleanupStack::PopAndDestroy(string); + aValue.SetValueL(string); + CleanupStack::Pop(string); // SetValueL takes ownership break; } default: