On Fri, Feb 14, 2014 at 11:01:11PM -0500, Bruce Momjian wrote:
> Actually, there are many places where Windows binaries free memory
> allocated by libpq. This is possible because of the way we compile
> libpq and the binary. Our PQfreemem() manual page has the details
>
> It is particularly important that this function, rather than
> free(), be used on Microsoft Windows. This is because allocating
> memory in a DLL and releasing it in the application works only if
> multithreaded/single-threaded, release/debug, and static/dynamic
> flags are the same for the DLL and the application. On non-Microsoft
> Windows platforms, this function is the same as the standard library
> function free().
>
> If the free() was not working for you, my guess is that you had
> mismatched flags for libpq and pg_dump compiles.
>
> However, you were right that there was a memory leak in that area of the
> code related to how funcfullsig and aggfullsig were conditionally
> assigned values, but not freed.
>
> The attached patch fixes this memory leak; not sure if this should be
> back-patched.
Patch applied. I have not backpatched this.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +