contentmgmt/referencedrmagent/tcaf/source/RecognizerStep.cpp
changeset 108 ca9a0fc2f082
parent 15 da2ae96f639b
--- a/contentmgmt/referencedrmagent/tcaf/source/RecognizerStep.cpp	Wed Oct 06 11:09:48 2010 +0530
+++ b/contentmgmt/referencedrmagent/tcaf/source/RecognizerStep.cpp	Sat Oct 30 16:29:23 2010 +0530
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -335,12 +335,16 @@
 	User::LeaveIfError(apparcSession.AppForDocument(fileName, uid, dataType));
 
 	RFile fileHandle;
-	fileHandle.Open(iParent.Fs(), uri, EFileRead);
+
+	CleanupClosePushL(fileHandle);
+	User::LeaveIfError(fileHandle.Open(iParent.Fs(), uri, EFileRead));
+
 	User::LeaveIfError(apparcSession.AppForDocument(fileHandle, uid, dataType2));
 
 	// Pass in a null file name to make sure it doesn't panic 
 	User::LeaveIfError(apparcSession.AppForDocument(nullFileName, uid, dataType3));
 
+	CleanupStack::PopAndDestroy(&fileHandle);
 	CleanupStack::PopAndDestroy(&apparcSession);	// close