generated from freudenreichan/info2Praktikum-DobleSpiel
small bug fix
This commit is contained in:
@@ -89,7 +89,7 @@ void *nextTreeData(TreeNode *root)
|
|||||||
// Releases all memory resources (including data copies).
|
// Releases all memory resources (including data copies).
|
||||||
void clearTree(TreeNode *root)
|
void clearTree(TreeNode *root)
|
||||||
{
|
{
|
||||||
if (root == NULL) {
|
if (root != NULL) {
|
||||||
clearTree(root->left);
|
clearTree(root->left);
|
||||||
clearTree(root->right);
|
clearTree(root->right);
|
||||||
free(root->data);
|
free(root->data);
|
||||||
|
|||||||
Reference in New Issue
Block a user