generated from freudenreichan/info2Praktikum-DobleSpiel
small bug fix
This commit is contained in:
parent
321b9630cc
commit
7f765d5373
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user