diff -r b023a8d2866a -r ea65f74e6de4 photosgallery/common/src/glxcommandparser.cpp --- a/photosgallery/common/src/glxcommandparser.cpp Thu Jul 15 18:39:01 2010 +0300 +++ b/photosgallery/common/src/glxcommandparser.cpp Thu Aug 19 09:55:03 2010 +0300 @@ -215,7 +215,9 @@ User::Leave(KErrArgument); } - const CMPXCollectionPath* path = aCommand.ValueCObjectL(aAttribute); + CMPXCollectionPath* path = aCommand.ValueCObjectL(aAttribute); + // ValueCObjectL returns the ownership of path, hence we need to delete + CleanupStack::PushL(path); RArray list; path->SelectionL(list); @@ -230,6 +232,7 @@ aArray.AppendL(TGlxMediaId(list[i])); } } + CleanupStack::PopAndDestroy(path); CleanupStack::Pop(&aArray); }