diff options
author | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-23 05:05:12 +0000 |
---|---|---|
committer | sfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-23 05:05:12 +0000 |
commit | e1982d4ca9c7f337e6055fcb38931bd96f3f9903 (patch) | |
tree | 99904bc569e00343f04a19120aac75b27b65b49d /MdeModulePkg/Universal | |
parent | d3592549901814d6f542996c12505e56e26219f1 (diff) | |
download | edk2-platforms-e1982d4ca9c7f337e6055fcb38931bd96f3f9903.tar.xz |
Add pointer check for NULL before dereference it.
Signed-off-by: sfu5
Reviewed-by: gdong1
Reviewed-by : czhan46
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12764 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal')
-rw-r--r-- | MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c index 65ab5ac702..b3ac646446 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c @@ -1621,7 +1621,9 @@ DhcpOnTimerTick ( goto END_SESSION;
}
- Instance->ElaspedTime= 0;
+ if (Instance != NULL) {
+ Instance->ElaspedTime= 0;
+ }
Status = DhcpSendMessage (
DhcpSb,
@@ -1643,7 +1645,9 @@ DhcpOnTimerTick ( goto END_SESSION;
}
- Instance->ElaspedTime= 0;
+ if (Instance != NULL) {
+ Instance->ElaspedTime= 0;
+ }
Status = DhcpSendMessage (
DhcpSb,
|