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
This commit is contained in:
sfu5 2011-11-23 05:05:12 +00:00
parent d359254990
commit e1982d4ca9
1 changed files with 6 additions and 2 deletions

View File

@ -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,