gethostbyname: fix crash

When an app doesn't have the internet permission, android_open_proxy
returns NULL, causing a segfault when calling fprintf. Fixed.

Change-Id: I598855350ed0db3cc88e5ae3b400145418a3a615
diff --git a/libc/netbsd/gethnamaddr.c b/libc/netbsd/gethnamaddr.c
index 1ab987e..2cb5fd3 100644
--- a/libc/netbsd/gethnamaddr.c
+++ b/libc/netbsd/gethnamaddr.c
@@ -753,6 +753,7 @@
 	}
 
 	proxy = android_open_proxy();
+	if (proxy == NULL) goto exit;
 
 	/* This is writing to system/netd/DnsProxyListener.cpp and changes
 	 * here need to be matched there */