]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.c
MdeModulePkg: INF/DEC file updates to EDK II packages
[mirror_edk2.git] / MdeModulePkg / Universal / ReportStatusCodeRouter / Smm / ReportStatusCodeRouterSmm.c
index 37ebc05934d63bc3aa011d613ad2003df56ee23f..79c8d1e36f95ae27538d5b23dfee02d48b43fc96 100644 (file)
@@ -2,8 +2,8 @@
   Report Status Code Router Driver which produces SMM Report Stataus Code Handler Protocol\r
   and SMM Status Code Protocol.\r
 \r
-  Copyright (c) 2009 -2010, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
@@ -165,9 +165,12 @@ ReportDispatcher (
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
-  for (Link = GetFirstNode (&mCallbackListHead); !IsNull (&mCallbackListHead, Link); Link = GetNextNode (&mCallbackListHead, Link)) {\r
+  for (Link = GetFirstNode (&mCallbackListHead); !IsNull (&mCallbackListHead, Link);) {\r
     CallbackEntry = CR (Link, SMM_RSC_HANDLER_CALLBACK_ENTRY, Node, SMM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE);\r
-\r
+    //\r
+    // The handler may remove itself, so get the next handler in advance.\r
+    //\r
+    Link = GetNextNode (&mCallbackListHead, Link);\r
     CallbackEntry->RscHandlerCallback (\r
                      Type,\r
                      Value,\r