Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b847d29

Browse files
committed
Remove PERFECT_MEM
Unallocate opaque.
1 parent f8e02c1 commit b847d29

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

src/backend/access/nbtree/nbtree.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.10 1996/11/13 20:47:18 scrappy Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.11 1996/11/15 18:36:59 momjian Exp $
1212
*
1313
* NOTES
1414
* This file contains only the public interface routines.
@@ -277,7 +277,6 @@ btbuild(Relation heap,
277277
}
278278
}
279279

280-
/* be tidy */
281280
pfree(nulls);
282281
pfree(attdata);
283282

@@ -467,14 +466,11 @@ btendscan(IndexScanDesc scan)
467466
so->btso_mrkbuf = InvalidBuffer;
468467
ItemPointerSetInvalid(iptr);
469468
}
470-
471-
/* don't need scan registered anymore */
472-
_bt_dropscan(scan);
473-
474-
/* be tidy */
469+
470+
pfree (scan->opaque);
475471
if ( so->keyData != (ScanKey) NULL )
476472
pfree (so->keyData);
477-
pfree (scan->opaque);
473+
_bt_dropscan(scan);
478474
}
479475

480476
/*

src/backend/access/nbtree/nbtscan.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.5 1996/11/05 10:35:33 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.6 1996/11/15 18:37:00 momjian Exp $
1111
*
1212
*
1313
* NOTES
@@ -78,9 +78,7 @@ _bt_dropscan(IndexScanDesc scan)
7878
else
7979
last->btsl_next = chk->btsl_next;
8080

81-
#ifdef PERFECT_MEM
8281
pfree (chk);
83-
#endif /* PERFECT_MEM */
8482
}
8583

8684
void

src/backend/access/rtree/rtscan.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.8 1996/11/05 10:54:19 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.9 1996/11/15 18:37:10 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -223,6 +223,7 @@ rtendscan(IndexScanDesc s)
223223
if (p != (RTreeScanOpaque) NULL) {
224224
freestack(p->s_stack);
225225
freestack(p->s_markstk);
226+
pfree (s->opaque);
226227
}
227228

228229
rtdropscan(s);

0 commit comments

Comments
 (0)