Unverified Commit ca6130b9 authored by James Guthrie's avatar James Guthrie Committed by GitHub
Browse files

Fix memory leaks in transform code (#433)

* Clean up PQExpBuffers in all usages

PQExpBuffers must be destroyed with `destroyPQExpBuffer`, otherwise the
bytes that they contain end up being leaked. In putting together this
patch I audited every call site of `createPQExpBuffer` and the subsequent
code in order to locate missing calls to `destroyPQExpBuffer`. Some
modifications may be classified as pedantic, but overall this patch
removes a number of real-world memory leaks.

* Fix memory leaks in wal2json transformation

The `stream_transform_file` function didn't free memory which was
allocated to contain the file contents.

The `FreeLogicalMessageTuple` function didn't correctly free all items
in its hierarchy.
parent f348a872
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment