# HG changeset patch # User Tom Sutcliffe # Date 1285173633 -3600 # Node ID ed15378514e019aadc0517df2a7747ebf5bcf2bc # Parent f3d01c9dd09907a700e5ab0fe1ec1bf8bde1ef72 Fixing some smoketests and a memory leak in CCommandBase. diff -r f3d01c9dd099 -r ed15378514e0 commands/drvinfo/drvinfo.cif --- a/commands/drvinfo/drvinfo.cif Wed Sep 22 10:56:39 2010 +0100 +++ b/commands/drvinfo/drvinfo.cif Wed Sep 22 17:40:33 2010 +0100 @@ -34,4 +34,4 @@ ==smoke-test -drvinfo $Quiet +drvinfo $Silent # Warnings about missing drives are not important diff -r f3d01c9dd099 -r ed15378514e0 commands/uidinfo/uidinfo.cif --- a/commands/uidinfo/uidinfo.cif Wed Sep 22 10:56:39 2010 +0100 +++ b/commands/uidinfo/uidinfo.cif Wed Sep 22 17:40:33 2010 +0100 @@ -34,5 +34,6 @@ ==smoke-test -uidinfo 0x100041af | export -s RESULT -var RESULT == "0x100041af EKern.exe^r^n" || $Error +# Use the fileserver as it's guaranteed to be there +uidinfo 0x100039e3 | export -s RESULT +var RESULT == "0x100039e3 efile.exe^r^n" || var RESULT == "0x100039e3 EFile.exe^r^n" || $Error # Emulator capitalises differently, sigh 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: