diff --git a/src/posix/platform/infra_if.cpp b/src/posix/platform/infra_if.cpp index e86fdafed65..b787f4fec48 100644 --- a/src/posix/platform/infra_if.cpp +++ b/src/posix/platform/infra_if.cpp @@ -671,9 +671,9 @@ void InfraNetif::DiscoverNat64PrefixDone(union sigval sv) otError InfraNetif::DiscoverNat64Prefix(uint32_t aInfraIfIndex) { - otError error = OT_ERROR_NONE; - struct addrinfo *hints = nullptr; - struct gaicb *reqs[1]; + otError error = OT_ERROR_NONE; + struct addrinfo *hints = nullptr; + struct gaicb *reqs[1] = {nullptr}; struct sigevent sig; int status;