cryptoservices/certificateandkeymgmt/tx509/CorruptionTest.cpp
changeset 108 ca9a0fc2f082
parent 8 35751d3474b7
--- a/cryptoservices/certificateandkeymgmt/tx509/CorruptionTest.cpp	Wed Oct 06 11:09:48 2010 +0530
+++ b/cryptoservices/certificateandkeymgmt/tx509/CorruptionTest.cpp	Sat Oct 30 16:29:23 2010 +0530
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 1998-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"
@@ -293,7 +293,8 @@
 
 	RFileReadStream stream;
 	User::LeaveIfError(stream.Open(iFs, fullname, EFileStream));
+	CleanupClosePushL(stream);
 	stream.ReadL(p, size);
-	stream.Close();
+	CleanupStack::PopAndDestroy(&stream);
 	return res;
 	}