fix undefined behavior in free
[oweals/musl.git] / src / passwd / nscd_query.c
index 1897edc83747e06577ef49f846556610d974cd67..d38e371bcda395855a4e9a125d4a75a115c76416 100644 (file)
@@ -40,7 +40,7 @@ retry:
        buf[0] = NSCDVERSION;
 
        fd = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
-       if (fd < 0 && errno != EAFNOSUPPORT) return NULL;
+       if (fd < 0) return NULL;
 
        if(!(f = fdopen(fd, "r"))) {
                close(fd);