linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp
changeset 61 2fc972553898
parent 14 b33c3d136b7e
child 75 c1029e558ef5
--- a/linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp	Mon Aug 30 12:20:22 2010 +0530
+++ b/linklayerprotocols/ethernetnif/EtherPkt/CardCtl.cpp	Mon Sep 13 16:12:41 2010 +0530
@@ -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;