diff --git a/awesome-client.c b/awesome-client.c index 9b72a2aa..d304352c 100644 --- a/awesome-client.c +++ b/awesome-client.c @@ -39,6 +39,9 @@ main() csfd = get_client_socket(); addr = get_client_addr(); + if(!addr || csfd < 0) + return EXIT_FAILURE; + while(fgets(buf, sizeof(buf), stdin)) if(sendto(csfd, buf, a_strlen(buf), MSG_NOSIGNAL, (const struct sockaddr *) addr, sizeof(struct sockaddr_un)) == -1)