diff options
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -170,6 +170,8 @@ void *reply_thread_routine(void* args) { exit(1); } char *song_name = malloc(string_size); + if(song_name == NULL) { perror("malloc in song name"); } + int bytes_to_read = string_size; if (recv_all(sockfd, song_name, &bytes_to_read) == -1) { perror("recv_all"); @@ -186,6 +188,7 @@ void *reply_thread_routine(void* args) { exit(1); } char *message = malloc(string_size); + if(message == NULL) { perror("malloc in message"); } int bytes_to_read = string_size; if (recv_all(sockfd, message, &bytes_to_read) == -1) { perror("recv_all"); |