diff --git a/net/socket/getsockname.c b/net/socket/getsockname.c index 30d019f142..2647edf54f 100644 --- a/net/socket/getsockname.c +++ b/net/socket/getsockname.c @@ -105,7 +105,7 @@ int psock_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr, FAR s */ #ifdef CONFIG_DEBUG_FEATURES - if (addr == NULL || addrlen <= 0) + if (addr == NULL || *addrlen <= 0) { return -EINVAL; }