I solved every memory leak I had, but I'm having some issues with this one. What's a good method to free memory from node* checker in this case?
bool check(const char *word)
{
node *checker = malloc(sizeof(node)) ;
int position = hash(word) ;
checker = table[position] ;
while(checker != NULL)
{
if(strcasecmp(checker->word, word) == 0)
{
return true ;
}
checker = checker->next ;
}
free(checker);
return false;
}