do i have memory leak?
/*
 * Return a pointer to the user with this name in
 * the list starting with head. Return NULL if no such user exists.
 *
 * NOTE: You'll likely need to cast a (const User *) to a (User *)
 * to satisfy the prototype without warnings.
 */
User *find_user(const char *name, const User *head) {
	// initialize the head of the linked list
	const User *curr = head;

	while (curr != NULL) {
		// if match is found, return the user
		if (strcmp(curr->name, name) == 0){
			return (User *)curr;
		}
		curr = curr->next;
	}
	// end of the list was reached without finding user
    return NULL;
}

/*
 * Make two users friends with each other.  This is symmetric - a pointer to
 * each user must be stored in the 'friends' array of the other.
 *
 * New friends must be added in the first empty spot in the 'friends' array.
 *
 * Return:
 *   - 0 on success.
 *   - 1 if the two users are already friends.
 *   - 2 if the users are not already friends, but at least one already has
 *     MAX_FRIENDS friends.
 *   - 3 if the same user is passed in twice.
 *   - 4 if at least one user does not exist.
 *
 * Do not modify either user if the result is a failure.
 * NOTE: If multiple errors apply, return the *largest* error code that applies.
 */
int make_friends(const char *name1, const char *name2, User *head) {
	// find the users
    User *user1 = find_user(name1, head);
    User *user2 = find_user(name2, head);
    //check if at least one user doesn't exist
    if (!user1 || !user2){
    	return 4;
    }

    // check if the users are equal
    else if (user1 == user2){
    	return 3;
    }

    // initialize the number of friends each user has
    int user1_friends = 0;
  	int user2_friends = 0;

  	// loop counts the number of friends each user has to see if they
  	// exceed the maximum number of friends
  	for (int i = 0; i < MAX_FRIENDS; i++) {
    	if (user1->friends[i] != NULL) {
      		user1_friends++;
    	}
    	if (user2->friends[i] != NULL) {
      		user2_friends++;
    	}
  	} 
  	if (user1_friends == MAX_FRIENDS || user2_friends == MAX_FRIENDS) {
    	return 2;
  	}

  	// checks if the users are already friends
  	for (int j = 0; j < MAX_FRIENDS; j++) {
    	if (user1->friends[j] == user2) {
      		return 1;
    	}
  	}

  	// otherwise, adds the users to each of their firends
  	for (int i = 0; i < MAX_FRIENDS; i++) {
    	if (user1->friends[i] == NULL) {
      		user1->friends[i] = user2;
      		break;
    	}
  	}
  	for (int i = 0; i < MAX_FRIENDS; i++) {
    	if (user2->friends[i] == NULL) {
      		user2->friends[i] = user1;
      		break;
    	}
  	}
  	return 0;
}