1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +03:00

Still more fixes for lossy-GiST-distance-functions patch.

Fix confusion in documentation, substantial memory leakage if float8 or
float4 are pass-by-reference, and assorted comments that were obsoleted
by commit 98edd617f3.
This commit is contained in:
Tom Lane
2015-05-23 15:22:25 -04:00
parent 284bef2977
commit 821b821a24
5 changed files with 55 additions and 41 deletions

View File

@ -459,10 +459,16 @@ reorderqueue_pop(IndexScanState *node)
{
HeapTuple result;
ReorderTuple *topmost;
int i;
topmost = (ReorderTuple *) pairingheap_remove_first(node->iss_ReorderQueue);
result = topmost->htup;
for (i = 0; i < node->iss_NumOrderByKeys; i++)
{
if (!node->iss_OrderByTypByVals[i] && !topmost->orderbynulls[i])
pfree(DatumGetPointer(topmost->orderbyvals[i]));
}
pfree(topmost->orderbyvals);
pfree(topmost->orderbynulls);
pfree(topmost);