8000 remove small allocation from crossmatch() · postgrespro/pgsphere@ff0453f · GitHub
[go: up one dir, main page]

Skip to content

Commit ff0453f

Browse files
committed
remove small allocation from crossmatch()
1 parent cd8da52 commit ff0453f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

crossmatch.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -878,14 +878,12 @@ crossmatch(CrossmatchContext *ctx, ItemPointer values)
878878
/* Return next result pair if any. Otherwise close SRF. */
879879
if (ctx->resultsPairs != NIL)
880880
{
881-
ResultPair *itemPointerPair = (ResultPair *) palloc(sizeof(ResultPair));
882-
883-
*itemPointerPair = *((ResultPair *) linitial(ctx->resultsPairs));
881+
ResultPair itemPointerPair = *((ResultPair *) linitial(ctx->resultsPairs));
884882
pfree(linitial(ctx->resultsPairs));
885883
ctx->resultsPairs = list_delete_first(ctx->resultsPairs);
886884

887-
values[0] = itemPointerPair->iptr1;
888-
values[1] = itemPointerPair->iptr2;
885+
values[0] = itemPointerPair.iptr1;
886+
values[1] = itemPointerPair.iptr2;
889887
}
890888
else
891889
{

0 commit comments

Comments
 (0)
0