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
Please register or sign in to comment