Based on the patch by Zheng Junling <zhengjunling@huawei.com>
and Chen Gang <cg.chen@huawei.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
{
static char *buff; /* defaults to NULL */
- free(buff);
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return "[NONE SET]";
+ free(buff);
buff = INET_rresolve((struct sockaddr_in *) sap, numeric, 0xffffff00);
return buff;
}
{
static char *buff;
- free(buff);
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return "[NONE SET]";
+ free(buff);
buff = INET6_rresolve((struct sockaddr_in6 *) sap, numeric);
return buff;
}