Fix a memory leak in tuplestore_end(). Unlikely to be significant during
authorNeil Conway <neilc@samurai.com>
Thu, 2 Aug 2007 17:48:57 +0000 (17:48 +0000)
committerNeil Conway <neilc@samurai.com>
Thu, 2 Aug 2007 17:48:57 +0000 (17:48 +0000)
normal operation, but tuplestore_end() ought to do what it claims to do.

src/backend/utils/sort/tuplestore.c

index 3980bfca8fbff0c948a841b38aec71e255ef34d8..fd283e4959dffea3aaa415b3c2391cde556f0671 100644 (file)
@@ -36,7 +36,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/utils/sort/tuplestore.c,v 1.23.2.1 2005/11/22 18:23:25 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/utils/sort/tuplestore.c,v 1.23.2.2 2007/08/02 17:48:57 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -283,6 +283,7 @@ tuplestore_end(Tuplestorestate *state)
                        pfree(state->memtuples[i]);
                pfree(state->memtuples);
        }
+       pfree(state);
 }
 
 /*