I don't think a source code change should be required.
http://msdn.microsoft.com/en-US/library/we1whae7(v=vs.80)
"When the application is linked with a debug version of the C run-time
libraries, free resolves to _free_dbg. For more information about how
the heap is managed during the debugging process, see The CRT Debug
Heap."