Fixing some smoketests and a memory leak in CCommandBase.
--- 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
--- 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
--- 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: