do i have a memory leak?
int create_user(const char *name, User **user_ptr_add) {
    User *curr1 = *user_ptr_add;

    //check if user with same name exists
    while(curr1 != NULL){
        if (strcmp(curr1->name, name) == 0){
            return 1;
        }
        curr1 = curr1->next;
    }

    // check if the name cannot fit in the 'name' array
    // use -1 to save space for the null terminator
    if (strlen(name) >= MAX_NAME - 1){
        return 2;
    }

    // create a new user and add it to the end of the list
    User *new_user = malloc(sizeof(User));
    strcpy(new_user->name, name);
    new_user->next = NULL;

    User *curr2 = *user_ptr_add;
    if (new_user != NULL) {
        if (curr2 == NULL) {
            *user_ptr_add = new_user;
        }
        else {
            while (curr2->next != NULL){
                curr2 = curr2->next;
            }
            curr2->next = new_user;
        }

        for (int i = 0; i < MAX_FRIENDS; i++) {  
            new_user->friends[i] = NULL;
        }
        for (int i = 0; i < MAX_FRIENDS; i++) {  
            new_user->profile_pic[i] = '\0';
        } 
        new_user->first_post = NULL; 
        return 0;
    }

    else {
        perror("Cannot allocate space");
        exit(3);
    }
}