]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix memory leak in rtdosplit, per report from Clive Page.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Jan 2005 02:47:52 +0000 (02:47 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Jan 2005 02:47:52 +0000 (02:47 +0000)
src/backend/access/rtree/rtree.c

index c2dd2bb8c77769eb1e7ac8589c65d07ba7c11f66..ad51e0c91d283b85a671ff29bd9e888752b26f74 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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,
                                                                                &(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);