linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp
changeset 69 955592283707
parent 14 b33c3d136b7e
child 75 c1029e558ef5
--- a/linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp	Fri Sep 17 08:38:11 2010 +0300
+++ b/linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp	Mon Oct 04 02:45:20 2010 +0300
@@ -328,8 +328,9 @@
 	
 	User::LeaveIfError(fileSrv.Connect());
 	User::LeaveIfError(macFile.Open(fileSrv,KEtherMacFileName,EFileRead));
+	CleanupClosePushL(macFile);
 	User::LeaveIfError(macFile.Read(macAddress,12));
-	macFile.Close();
+	CleanupStack::PopAndDestroy(&macFile);
 	fileSrv.Close();
 	controlBuf.SetLength(8);	
 	controlBuf[0] = KEthSpeed10BaseT;