Initializtion

This commit is contained in:
Kozar 2024-04-25 21:36:52 +02:00
parent bcf92ad070
commit 65f1c89f27

View File

@ -29,6 +29,10 @@ node_t *build_tree(int *tree_data, size_t tree_data_len) {
}
current = malloc(sizeof(node_t));
if (current == NULL) {
free_tree(root);
return NULL;
}
current->data = tree_data[i];
current->left = NULL;
current->right = NULL;