mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Little memmory leak in RelationFlushRelation() in freeing
relation->rd_att (relation' TupleDesc).
This commit is contained in:
12
src/backend/utils/cache/relcache.c
vendored
12
src/backend/utils/cache/relcache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.6 1996/11/27 08:16:01 bryanh Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.7 1997/05/20 11:41:38 vadim Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1220,11 +1220,11 @@ RelationFlushRelation(Relation *relationPtr,
|
|||||||
|
|
||||||
FileInvalidate(RelationGetSystemPort(relation));
|
FileInvalidate(RelationGetSystemPort(relation));
|
||||||
|
|
||||||
i = relation->rd_rel->relnatts - 1;
|
p = relation->rd_att->attrs;
|
||||||
p = &relation->rd_att->attrs[i];
|
for (i = 0; i < relation->rd_rel->relnatts; i++, p++)
|
||||||
while ((i -= 1) >= 0) {
|
pfree (*p);
|
||||||
pfree(*p--);
|
pfree (relation->rd_att->attrs);
|
||||||
}
|
pfree (relation->rd_att);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (relation->rd_rules) {
|
if (relation->rd_rules) {
|
||||||
|
Reference in New Issue
Block a user