summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/DnsDxe
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/DnsDxe')
-rw-r--r--NetworkPkg/DnsDxe/DnsImpl.c4
-rw-r--r--NetworkPkg/DnsDxe/DnsProtocol.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
index 8725670a8e..823bcf3792 100644
--- a/NetworkPkg/DnsDxe/DnsImpl.c
+++ b/NetworkPkg/DnsDxe/DnsImpl.c
@@ -1360,8 +1360,6 @@ ParseDnsResponse (
// Check whether it's the GeneralLookUp querying.
//
if (Instance->Service->IpVersion == IP_VERSION_4 && Dns4TokenEntry->GeneralLookUp) {
- ASSERT (Dns4TokenEntry != NULL);
-
Dns4RR = Dns4TokenEntry->Token->RspData.GLookupData->RRList;
AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection);
@@ -1387,8 +1385,6 @@ ParseDnsResponse (
RRCount ++;
} else if (Instance->Service->IpVersion == IP_VERSION_6 && Dns6TokenEntry->GeneralLookUp) {
- ASSERT (Dns6TokenEntry != NULL);
-
Dns6RR = Dns6TokenEntry->Token->RspData.GLookupData->RRList;
AnswerData = (UINT8 *) AnswerSection + sizeof (*AnswerSection);
diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c
index e7aa227994..a3f3de9766 100644
--- a/NetworkPkg/DnsDxe/DnsProtocol.c
+++ b/NetworkPkg/DnsDxe/DnsProtocol.c
@@ -462,6 +462,8 @@ Dns4HostNameToIp (
goto ON_EXIT;
}
+ ASSERT (Packet != NULL);
+
//
// Save the token into the Dns4TxTokens map.
//
@@ -635,6 +637,8 @@ Dns4GeneralLookUp (
goto ON_EXIT;
}
+ ASSERT (Packet != NULL);
+
//
// Save the token into the Dns4TxTokens map.
//
@@ -1231,6 +1235,8 @@ Dns6HostNameToIp (
goto ON_EXIT;
}
+ ASSERT (Packet != NULL);
+
//
// Save the token into the Dns6TxTokens map.
//
@@ -1404,6 +1410,8 @@ Dns6GeneralLookUp (
goto ON_EXIT;
}
+ ASSERT (Packet != NULL);
+
//
// Save the token into the Dns6TxTokens map.
//