From: Tom Lane Date: Mon, 24 Jan 2005 02:47:26 +0000 (+0000) Subject: Fix memory leak in rtdosplit, per report from Clive Page. X-Git-Tag: REL8_1_0BETA1~1498 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ffe9f7946011e07dcb46b8c2eb4e96ac61ffefe;p=postgresql Fix memory leak in rtdosplit, per report from Clive Page. --- 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);