is it correctly copying the username from partial read return input?
client_fd = accept_connection(sock_fd, users, &user_list);

Client *c = malloc(sizeof(Client));
c->fd = client_fd;
c->username = NULL;

char *s1 = "What is your username?\r\n";
if (write(c->fd, s1, strlen(s1)) < 0) {
    perror("write");
    exit(1);
}

char username[MAX_NAME + 1];

int num_read = 0;

char *input = partial_read(c->fd);
printf("%s\n", input);

num_read = strlen(input);

if (num_read < 0) {
    perror("server: read username");
    exit(1);
}

username[num_read] = '\0';

if ((c->username = malloc(strlen(input) * sizeof(char))) == NULL) {
    perror("malloc at server");
    exit(1);
}

strcpy(username, input);
strcpy(c->username, username);

user = process_name(&user_list, client_fd, c->username);
printf("%s", user->name);
printf("returned name\r\n");

if (client_fd > max_fd) {
    max_fd = client_fd;
}
FD_SET(client_fd, &all_fds);
// printf("Accepted connection\n");