Subject Re: [firebird-support] pointer returned by FREE_IT not allocated by ib_util_malloc
Author Ivan Arabadzhiev
Well, it`s hard to help without code but I understand. Personally, I`d try to refactor things so GetResultBfr isn`t static (but my gut has been wrong before ...)
There are opensource UDFs out there - ask google and try to compile one on your own (just in case there is something wrong elsewhere).

2014-11-10 17:47 GMT+02:00 sboydlns@... [firebird-support] <>:

The code is a bit involved because it supports multiple versions of Firebird and multiple OSes. However, the windows version calls this function to get the buffer returned by FREE_IT:

static char *
GetResultBfr (int len)

return ((char *) ib_util_malloc (len));

My DLL is linked to the ib_util.dll using an import library. So it is statically linked to the DLL but not to the underlying object files. I already checked the system in question and there are no stray copies of ib_util.dll floating around. Just the one in the Firebird installation directory.