Yes. C only does pass by value. Therefore, if you want to change the value of something in a function, and have that change persist after the function, then you need to pass a pointer to that thing. If you want to change an int, you pass a pointer to an int, and change the int through the pointer. Same thing applies if that thing is already a pointer: you pass a pointer to a pointer. If Forest is a pointer to something, and you wish to change what it points to, i.e. you want it to hold the value of malloc after the function is done, you have to pass it as Forest *root, and use *root = malloc in the function.