Error handling in cbt_clone #26
Labels
enhancement
New feature or request
first-timers-only
Good for new comers
good first issue
Good for newcomers
help wanted
Extra attention is needed
Testing
Testing a feature or a function
Task
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
Method
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.
Prototype
Where to code
You will need to modify the following functions
Tests
The text was updated successfully, but these errors were encountered: