Skip to content

Commit 59d4fd9

Browse files
committed
libpcp: macOS getaddrinfo requires extra non-failure check
1 parent 9adddd2 commit 59d4fd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libpcp/src/access.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ getHostAccessSpecs(const char *name, int *sts)
861861
}
862862
__pmHostEntFree(servInfo);
863863
}
864-
else {
864+
else if (hosterror()) {
865865
char errmsg[PM_MAXERRMSGLEN];
866866
PM_LOCK(__pmLock_extcall);
867867
pmstrncpy(errmsg, PM_MAXERRMSGLEN, hoststrerror()); /* THREADSAFE */

0 commit comments

Comments
 (0)