drivers: wifi: simplelink: fix Coverity issue in getaddrinfo()
Check for case where host == NULL but service != NULL could have resulted later in a NULL dereference. Coverity-CID: 189516 Fixes #11090 Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
This commit is contained in:
parent
53153405aa
commit
508c941d32
1 changed files with 2 additions and 2 deletions
|
@ -518,7 +518,7 @@ exit:
|
|||
/*
|
||||
* Later SimpleLink SDK versions implement the full getaddrinfo semantics,
|
||||
* returning potentially multiple IP addresses.
|
||||
* This version implements a simple gethostbyname() API.
|
||||
* This version implements a simple gethostbyname() API for client only.
|
||||
*/
|
||||
static int simplelink_getaddrinfo(const char *node, const char *service,
|
||||
const struct addrinfo *hints,
|
||||
|
@ -534,7 +534,7 @@ static int simplelink_getaddrinfo(const char *node, const char *service,
|
|||
_u32 ipaddr[4];
|
||||
|
||||
/* Check args: */
|
||||
if (!node && !service) {
|
||||
if (!node) {
|
||||
retval = EAI_NONAME;
|
||||
goto exit;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue