Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Error handling in cbt_clone #26
If the clone_object function is not NULL and the clone_object returns NULL for any reason it should terminate, free all the memory allocated so far for the clone and return NULL
When invoking the clone_object, check if the return value is NULL. If it is, then simply terminate and return NULL. You will have to check if the return value from the recursive call is NULL because of an error or because the leafs of the trees have been reached.
Where to code
You will need to modify the following functions