]> git.proxmox.com Git - mirror_edk2.git/commit - OptionRomPkg/UndiRuntimeDxe/Init.c
The Driver Binding Protocol Stop() function for the UndiRuntimeDxe is performing...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Oct 2012 23:49:50 +0000 (23:49 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 3 Oct 2012 23:49:50 +0000 (23:49 +0000)
commit4a823e23b119bfb9b0182e8717a0ea5139f82190
tree83e5a2cfb12cc27310bb88f074e2bfefb2e6737f
parentbbcafc442b2db91322dd3ba04e166236a41b111d
The Driver Binding Protocol Stop() function for the UndiRuntimeDxe is performing actions in the incorrect order.  The call to UninstallMultipleProtocolInterfaces() removes all the protocols from the child handle, which means ChildHandleBuffer[Index] is no longer valid.  After the call to UninstallMultipleProtocolInterfaces(), ChildHandleBuffer[Index] is used again in a call to CloseProtocol().  The handle is not valid, so CloseProtocol() returns an error and generates an ASSERT().

This patch changes the order to call CloseProtocol() before calling UninstallMultipleProtocolInterfaces().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13781 6f19259b-4bc3-4df7-8a09-765794883524
OptionRomPkg/UndiRuntimeDxe/Init.c