User *curr = *user_ptr_del;
        User *prev=NULL;
        //find the user
        while(curr!=NULL && strcmp(curr->name,name)!=0){
        prev=curr;
        curr=curr->next;
        }
        //remove the user
        if (strcmp(curr->name,name)==0){

                //remove user from friend lists
                for(int i=0; i<MAX_FRIENDS;i++){

                        //find this user within friends' lists
                        User *f=curr->friends[i];
                        if(f!=NULL){
                                for(int j=0;j<MAX_FRIENDS;j++){
why am I getting a set fault?