summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-12-18 07:01:23 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-12-18 07:01:23 +0000
commitc4a62a12c2890297cfcb9828b51b058fb347c01a (patch)
treef60f918368c8c96325bcfbc050c7b6189f567492 /MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
parent372787b85a2a6a6da0a7b0357f58953da26d81a8 (diff)
downloadedk2-platforms-c4a62a12c2890297cfcb9828b51b058fb347c01a.tar.xz
Sync the latest version from R8.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4400 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c')
-rw-r--r--MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
index 9cbd29511f..39924cfa7a 100644
--- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
+++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c
@@ -153,6 +153,8 @@ Udp4CreateService (
EFI_STATUS Status;
IP_IO_OPEN_DATA OpenData;
+ NetZeroMem (Udp4Service, sizeof (UDP4_SERVICE_DATA));
+
Udp4Service->Signature = UDP4_SERVICE_DATA_SIGNATURE;
Udp4Service->ServiceBinding = mUdp4ServiceBinding;
Udp4Service->ImageHandle = ImageHandle;
@@ -184,7 +186,7 @@ Udp4CreateService (
//
Status = IpIoOpen (Udp4Service->IpIo, &OpenData);
if (EFI_ERROR (Status)) {
- goto RELEASE_IPIO;
+ goto ON_ERROR;
}
//
@@ -198,7 +200,7 @@ Udp4CreateService (
&Udp4Service->TimeoutEvent
);
if (EFI_ERROR (Status)) {
- goto RELEASE_IPIO;
+ goto ON_ERROR;
}
//
@@ -210,18 +212,16 @@ Udp4CreateService (
UDP4_TIMEOUT_INTERVAL
);
if (EFI_ERROR (Status)) {
- goto RELEASE_ALL;
+ goto ON_ERROR;
}
- Udp4Service->MacString = NULL;
-
return EFI_SUCCESS;
-RELEASE_ALL:
-
- gBS->CloseEvent (Udp4Service->TimeoutEvent);
+ON_ERROR:
-RELEASE_IPIO:
+ if (Udp4Service->TimeoutEvent != NULL) {
+ gBS->CloseEvent (Udp4Service->TimeoutEvent);
+ }
IpIoDestroy (Udp4Service->IpIo);