int create_user(const char *name, User **user_ptr_add) {
 17
 18     // Check the sizeof the name array
 19     if (strlen(name) > 31) {
 20         // Name is too long
 21         return 2;
 22     }
 23
 24     // Initialize a new user with name pointing to NULL
 25     User new_user;
 26     strcpy(new_user.name, name);
 27     new_user.next = NULL;
 28
 29     // Check if there are no users currently in the list
 30     if (*user_ptr_add == NULL) {
 31         *user_ptr_add = &new_user;
 32         return 0;
 33     }
 34
 35     // Create a temp variable to iterate over the list
 36     User *curr = *user_ptr_add;
 37
 38     while (curr != NULL) {
 39
 40       // Check if this is the end of the list
 41       if (curr->next == NULL && curr->name != name) {
 42           // Insert the new user
 43           curr->next = &new_user;
 44       } else if (curr->name != name) {
 45           // If the name isnt taken, keep iterating
 46           curr = curr->next;
 47       } else {
 48           // The name is taken
 49           return 1;
 50       }
 51     }
 52
 53     // Successfully added the new user
 54     return 0;
 55 }
How do I allocate memory when creating the user struct