1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-18 12:22:09 +03:00

Fix memory leak in rtdosplit, per report from Clive Page.

This commit is contained in:
Tom Lane
2005-01-24 02:47:52 +00:00
parent 8e423d32cd
commit f50e08a998

View File

@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/rtree/rtree.c,v 1.85 2004/12/31 21:59:26 pgsql Exp $ * $PostgreSQL: pgsql/src/backend/access/rtree/rtree.c,v 1.85.4.1 2005/01/24 02:47:52 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@@ -595,6 +595,8 @@ rtdosplit(Relation r,
rtup = (IndexTuple) index_formtuple(tupDesc, rtup = (IndexTuple) index_formtuple(tupDesc,
&(v.spl_rdatum), isnull); &(v.spl_rdatum), isnull);
pfree(isnull); pfree(isnull);
pfree(DatumGetPointer(v.spl_ldatum));
pfree(DatumGetPointer(v.spl_rdatum));
/* set pointers to new child pages in the internal index tuples */ /* set pointers to new child pages in the internal index tuples */
ItemPointerSet(&(ltup->t_tid), lbknum, 1); ItemPointerSet(&(ltup->t_tid), lbknum, 1);