summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--erts/etc/common/inet_gethost.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/etc/common/inet_gethost.c b/erts/etc/common/inet_gethost.c
index 54825219b4..961b3288a6 100644
--- a/erts/etc/common/inet_gethost.c
+++ b/erts/etc/common/inet_gethost.c
@@ -1878,7 +1878,8 @@ static int worker_loop(void)
DEBUGF(5,("getnameinfo returned %d", error_num));
if (error_num) {
error_num = map_netdb_error_ai(error_num);
- sa = NULL;
+ FREE(sa);
+ sa = NULL;
}
#elif defined(HAVE_GETIPNODEBYADDR) /*#ifdef HAVE_GETNAMEINFO*/
struct in6_addr ia;