From 0ffe9f7946011e07dcb46b8c2eb4e96ac61ffefe Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 24 Jan 2005 02:47:26 +0000 Subject: [PATCH] Fix memory leak in rtdosplit, per report from Clive Page. --- src/backend/access/rtree/rtree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/access/rtree/rtree.c b/src/backend/access/rtree/rtree.c index b1762bfe1f..5f799fd48a 100644 --- a/src/backend/access/rtree/rtree.c +++ b/src/backend/access/rtree/rtree.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/rtree/rtree.c,v 1.86 2005/01/18 23:25:47 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/access/rtree/rtree.c,v 1.87 2005/01/24 02:47:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -591,6 +591,8 @@ rtdosplit(Relation r, rtup = (IndexTuple) index_formtuple(tupDesc, &(v.spl_rdatum), isnull); pfree(isnull); + pfree(DatumGetPointer(v.spl_ldatum)); + pfree(DatumGetPointer(v.spl_rdatum)); /* set pointers to new child pages in the internal index tuples */ ItemPointerSet(&(ltup->t_tid), lbknum, 1); -- 2.40.0