Fix a bug to handle case that SendForm() is called with an invalid FormSetGuid.
authorxdu2 <xdu2@de2fecce-e211-0410-80a6-f3fac2684e05>
Fri, 13 Nov 2009 05:40:21 +0000 (05:40 +0000)
committerxdu2 <xdu2@de2fecce-e211-0410-80a6-f3fac2684e05>
Fri, 13 Nov 2009 05:40:21 +0000 (05:40 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@9422 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c

index 141f953..7f6ff67 100644 (file)
@@ -655,6 +655,14 @@ DestroyFormSet (
   FORM_EXPRESSION       *Expression;\r
   FORM_BROWSER_FORM     *Form;\r
 \r
+  if (FormSet->IfrBinaryData == NULL) {\r
+    //\r
+    // Uninitialized FormSet\r
+    //\r
+    FreePool (FormSet);\r
+    return;\r
+  }\r
+\r
   //\r
   // Free IFR binary buffer\r
   //\r