git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11360
6f19259b-4bc3-4df7-8a09-
765794883524
\r
DevicePath = AppendDevicePathNode (AtaBusDriverData->ParentDevicePath, NewDevicePathNode);\r
if (DevicePath == NULL) {\r
+ Status = EFI_OUT_OF_RESOURCES;\r
goto Done;\r
}\r
\r
DeviceHandle = NULL;\r
+ RemainingDevicePath = DevicePath;\r
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &DeviceHandle);\r
if (!EFI_ERROR (Status) && (DeviceHandle != NULL) && IsDevicePathEnd(RemainingDevicePath)) {\r
Status = EFI_ALREADY_STARTED;\r
+ FreePool (DevicePath);\r
goto Done;\r
}\r
\r