do you think there are any memory leaks here?
int create_user(const char *name, User **user_ptr_add) {

    if(strlen(name) + 1 > MAX_NAME){
        return 2;
    }

    User * current = *user_ptr_add;

    User *new_user = malloc(sizeof(User));
    if(new_user == NULL){
        perror("malloc");
        exit(1);
    }


    new_user->first_post = NULL;
    new_user->next = NULL;
    for(int i = 0; i < MAX_FRIENDS;i++){
        new_user->friends[i] = NULL;
    }
    strncpy(new_user->name, name, MAX_NAME);
    new_user->name[MAX_NAME - 1] = '\0';

    User * predecessor;
    if(current != NULL){
        while(current != NULL){
            if(strcmp(current->name, name) == 0 ){
                return 1;
            }
            predecessor = current;
            current = current -> next;
        }
        predecessor->next = new_user;
    }else{
        *user_ptr_add = new_user;
    }

    
    return 0;
}


typedef struct user {
    char name[MAX_NAME];
    char profile_pic[MAX_NAME];  
    struct post *first_post;
    struct user *friends[MAX_FRIENDS];
    struct user *next;
} User;