This patch enhances the NULL pointer check of the HttpInstance->RemoteHost
pointer before dereference it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18482
6f19259b-4bc3-4df7-8a09-
765794883524
Configure = TRUE;\r
ReConfigure = TRUE; \r
\r
- if (HttpInstance->RemoteHost == NULL && HttpInstance->RemotePort == 0) {\r
+ if (HttpInstance->RemoteHost == NULL) {\r
//\r
// Request() is called the first time. \r
//\r
if (HttpInstance->RemoteHost != NULL) {\r
FreePool (HttpInstance->RemoteHost);\r
HttpInstance->RemoteHost = NULL;\r
+ HttpInstance->RemotePort = 0;\r
}\r
}\r
} \r