int create_user(const char *name, User **user_ptr_add) {
    if (strlen(name) > 31){
        return 2;   // return 2 if the given name cannot fit in the 'name' array
    }

    User* curr = *user_ptr_add;

    // if no user has been created
    if (curr == NULL){
        User *new_user = malloc(sizeof(User));
        if (new_user == NULL) {
            perror("malloc");  // prints an error message to stderr
            return 3;
        }
        strcpy(new_user->name, name);

        // Initialize 'next', 'first_post' and every element in 'friends' to NULL
        new_user->next = NULL;
        new_user->first_post = NULL;
        for (int i = 0; i < MAX_FRIENDS; i++){
            (new_user->friends)[i] = NULL;
        }
        *user_ptr_add = new_user;
        return 0;
    }

    while (strcmp(curr->name, name) != 0 && curr->next != NULL){
        curr = curr->next;
    }

    if (strcmp(curr->name, name) == 0){
        return 1;   // return 1 if a user by this name already exists in this list
    }else{
        User *new_user = malloc(sizeof(User));
        if (new_user == NULL) {
            perror("malloc");  // prints an error message to stderr
            return 3;
        }
        strcpy(new_user->name, name);
        new_user->next = NULL;
        new_user->first_post = NULL;
        for (int i = 0; i < MAX_FRIENDS; i++){
            (new_user->friends)[i] = NULL;
        }
        curr->next = new_user;
        return 0;
    }

}
Address 0x4a75700 is 32 bytes inside a block of size 160 alloc'd