Subject pointer returned by FREE_IT not allocated by ib_util_malloc

I have a UDF DLL that has been running for years. I recently tried to upgrade a site from FB 2.0 to FB Everything went well until I tried to start my application. Then I got a "pointer returned by FREE_IT not allocated by ib_util_malloc. The thing is, all memory returned by FREE_IT is being allocated using ib_util_malloc. What else could be causing this error?

I am running this site on Windows 2003, 32-bit. The DLL is written using BCB 2007.

Any help is appreciated.