mirror of
https://github.com/espressif/openthread.git
synced 2026-07-31 16:17:47 +00:00
[posix] initialize hints in InfraNetif::DiscoverNat64Prefix (#8070)
This commit is contained in:
@@ -615,7 +615,7 @@ exit:
|
||||
otError InfraNetif::DiscoverNat64Prefix(uint32_t aInfraIfIndex)
|
||||
{
|
||||
otError error = OT_ERROR_NONE;
|
||||
struct addrinfo *hints;
|
||||
struct addrinfo *hints = nullptr;
|
||||
struct gaicb * reqs[1];
|
||||
struct sigevent sig;
|
||||
int status;
|
||||
@@ -649,7 +649,10 @@ otError InfraNetif::DiscoverNat64Prefix(uint32_t aInfraIfIndex)
|
||||
exit:
|
||||
if (error != OT_ERROR_NONE)
|
||||
{
|
||||
freeaddrinfo(hints);
|
||||
if (hints)
|
||||
{
|
||||
freeaddrinfo(hints);
|
||||
}
|
||||
free(reqs[0]);
|
||||
}
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user