netlib/ping: fix the stack variable not initialized.

We add devname in ping_info_s, but not initializeed, cause
data abort as value in stack possible not NULL.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2025-07-10 17:10:55 +08:00 committed by Xiang Xiao
parent 416c315f92
commit 1512f9c6e5

View file

@ -107,6 +107,9 @@ int netlib_check_ipconnectivity(FAR const char *ip, int timeout, int retry)
info.timeout = timeout;
info.callback = ping_ipaddr_callback;
info.priv = &replies;
#ifdef CONFIG_NET_BINDTODEVICE
info.devname = NULL;
#endif
/* if ip is NULL we use default DNS server */