Ok, so its telling you that there is a bad pointer being passed to free.
Things you can do:
* Set "ulimit -c unlimited" in the shell before running the program.
That way you get a "core" file when the program crashes and can run the
debugger on it to find out why.
* Run valgrind on the executable. When the program finishes it will
produce a summary of all memory errors.
Hope that helps.
Stevie