- result = calloc(1, sizeof(struct addrinfo));
- struct sockaddr_un *sa_unix = calloc(1, sizeof(struct sockaddr_un));
- if (result == NULL || sa_unix == NULL) {
- sfree(result);
- sfree(sa_unix);
+
+ struct sockaddr_un *sa_unix = calloc(1, sizeof(*sa_unix));
+ if (sa_unix == NULL)
+ return;
+
+ result = calloc(1, sizeof(*result));
+ if (result == NULL) {
+ free(sa_unix);