Merge "gethostbyname: fix crash"
diff --git a/libc/netbsd/gethnamaddr.c b/libc/netbsd/gethnamaddr.c
index 04b1f54..ee5052e 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 */