Very general: Is there an easy way to tell which line of code last freed a block of memory when an access violation occurs?
Less general:
Short answer: no.
What you need is a debug malloc. I don't keep up with Windows any longer but there are several about, including this free one.
Looks like Visual Studio C has a built in version. See here
When the application is linked with a debug version of the C run-time libraries, malloc resolves to
_malloc_dbg
. For more information about how the heap is managed during the debugging process, see The CRT Debug Heap.
... and see here for _malloc_dbg.