Don't call freeaddrinfo with a NULL ptr.
bug:5067055 Change-Id: I863dc4760a0aa449ac6298397ed571d8d9287801
This commit is contained in:
parent
28de3e5901
commit
92425f097d
@ -1860,8 +1860,10 @@ _free_nameservers_locked(struct resolv_cache_info* cache_info)
|
||||
for (i = 0; i <= MAXNS; i++) {
|
||||
free(cache_info->nameservers[i]);
|
||||
cache_info->nameservers[i] = NULL;
|
||||
freeaddrinfo(cache_info->nsaddrinfo[i]);
|
||||
cache_info->nsaddrinfo[i] = NULL;
|
||||
if (cache_info->nsaddrinfo[i] != NULL) {
|
||||
freeaddrinfo(cache_info->nsaddrinfo[i]);
|
||||
cache_info->nsaddrinfo[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user