When I use this
valgrind --leak-check=yes ./Main
I have about 185236 errors. It said that:
xx bytes in x blocks are possibly lost in loss record xxxx of xxxx
Here's my code:
Node InsertString(Head head, Node tree, char* data) {
    if (tree == NULL) {
        tree = malloc(sizeof (struct TreeNode)); //Error
        if (tree == NULL) {
            printf("Out of Space!\n");
        } else {
             tree->theData = malloc(sizeof (char) * strlen(data));//Error
            strcpy(tree->theData, data);
        }
    } else {
            if (strcmp(data, tree->theData) < 0) {
                tree->Left = InsertString(head, tree->Left, data); //Error
            } else {
                if (strcmp(data, tree->theData) > 0) {
                    tree->Right = InsertString(head, tree->Right, data);//Error
                }
            }
        } 
    }
    return tree;
}
Thank you!
 
     
     
    