Initializacia

This commit is contained in:
Kozar 2024-11-12 12:53:51 +00:00
parent 5501d3b44c
commit ee9e324e9f

View File

@ -42,6 +42,13 @@ struct tree* load_tree() {
destroy_tree(node); destroy_tree(node);
return NULL; return NULL;
} }
} else {
struct tree* extra = read_tree();
if (extra) {
free(extra);
destroy_tree(node);
return NULL;
}
} }
return node; return node;
@ -49,6 +56,7 @@ struct tree* load_tree() {
void run_tree(struct tree* tree) { void run_tree(struct tree* tree) {
if (!tree) { if (!tree) {
return; return;
@ -115,3 +123,4 @@ int main() {
return 0; return 0;
} }