I don't know why it doesn't work, but I think the problem is caused due to the memory-RE-allocation in my program. What I did:
1) Allocating memory (e.g. y=50)
2) Re-allocating memory if a certain value is exceeded (e.g. y>50 -> the ney y = 100)
3) Free memory (100)
When I free the memory the error is reported exactly at the value where I did the reallocation, i.e. at y=50...
Does free maybe not "know" that it has now y=100 instead of 50??