all works fine but part way through the unload function I get
Program received signal SIGSEGV, Segmentation fault. 0xb7e929e5 in _int_free (av=0xb7fc9420 <main_arena>, p=0x8844168, have_lock=0) at malloc.c:3814
3814 malloc.c: No such file or directory.
my code for the unload function is:-
bool unload(void)
{
for(place = 0; place < 26; place++)
{
pointer = root;
checkArray(pointer);
}
return true;
}
void checkArray(node *pointer)
{
if (root->child[place] != NULL)
{
for (int i = 0 ; i < SIZE ; i++ )
{
if (pointer->child[i] != NULL)
{
childNum = i;
current = pointer;
pointer = pointer->child[i];
checkArray(pointer);
return;
}
}
free(pointer);
current->child[childNum]=NULL;
pointer = root;
checkArray(pointer);
return;
}
else
{
return;
}
}
can anyone help