Why is free() causing an error here without the else block?
This is the full code I have right now. I have tried everything that I could think of, but when I have the contents of the else
block, despite the code skipping through it, the code runs smoothly with no memory leaks.
How does C free() work? [duplicate]
Possible Duplicate:
How malloc() and free() work
Can a call to free() in C ever fail?
Can a call to free()
fail in any way?