Clean up data conversion short-lived memory context.

Joe Conway <mail@joeconway.com>

Commit: 3e2cfa42f9b9ddfb469f0f56d78377b1864eb894
Author: Joe Conway <mail@joeconway.com>
Date: 2014-06-20T19:27:04Z
Releases: 9.2.9
Clean up data conversion short-lived memory context.

dblink uses a short-lived data conversion memory context. However it
was not deleted when no longer needed, leading to a noticeable memory
leak under some circumstances. Plug the hole, along with minor
refactoring. Backpatch to 9.2 where the leak was introduced.

Report and initial patch by MauMau. Reviewed/modified slightly by
Tom Lane and me.

Files

PathChange+/−
contrib/dblink/dblink.c modified +13 −9