Imported Upstream connman version 1.38
[platform/upstream/connman.git] / gweb / gweb.c
index 7037cd9..69aea5b 100755 (executable)
@@ -1288,7 +1288,8 @@ static bool is_ip_address(const char *host)
        addr = NULL;
 
        result = getaddrinfo(host, NULL, &hints, &addr);
-       freeaddrinfo(addr);
+       if(!result)
+               freeaddrinfo(addr);
 
        return result == 0;
 }