Revision: 14354
          http://edk2.svn.sourceforge.net/edk2/?rev=14354&view=rev
Author:   sfu5
Date:     2013-05-14 03:01:51 +0000 (Tue, 14 May 2013)
Log Message:
-----------
Fix bug in PXE driver: memory may be freed before use.
Signed-off-by: Fu Siyuan <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Reviewed-by: Ouyang Qian <[email protected]>

Modified Paths:
--------------
    trunk/edk2/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c

Modified: trunk/edk2/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c
===================================================================
--- trunk/edk2/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c    2013-05-13 17:22:30 UTC 
(rev 14353)
+++ trunk/edk2/NetworkPkg/UefiPxeBcDxe/PxeBcDriver.c    2013-05-14 03:01:51 UTC 
(rev 14354)
@@ -1353,9 +1353,6 @@
            &gEfiCallerIdGuid,
            &Private->Id
            );
-    if (Private != NULL) {
-      FreePool (Private);
-    }
   }
 
   if (IpVersion == IP_VERSION_4) {
@@ -1364,6 +1361,10 @@
     PxeBcDestroyIp6Children (This, Private);
   }
 
+  if (FirstStart && Private != NULL) {
+    FreePool (Private);
+  }
+
   return Status;
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to