mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Change some mallocs to palloc.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.59 1997/12/29 04:31:28 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.60 1997/12/29 05:13:35 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -51,7 +51,6 @@ List *extras = NIL;
|
||||
* Returns a list of transformed parse trees. Optimizable statements are
|
||||
* all transformed to Query while the rest stays the same.
|
||||
*
|
||||
* CALLER is responsible for freeing the QueryTreeList* returned
|
||||
*/
|
||||
QueryTreeList *
|
||||
parse_analyze(List *pl)
|
||||
@ -82,7 +81,7 @@ parse_analyze(List *pl)
|
||||
pl = lnext(pl);
|
||||
if (pstate->p_target_relation != NULL)
|
||||
heap_close(pstate->p_target_relation);
|
||||
free(pstate);
|
||||
pfree(pstate);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.3 1997/11/26 03:42:44 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.4 1997/12/29 05:13:46 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -46,7 +46,7 @@ make_parsestate(void)
|
||||
{
|
||||
ParseState *pstate;
|
||||
|
||||
pstate = malloc(sizeof(ParseState));
|
||||
pstate = palloc(sizeof(ParseState));
|
||||
pstate->p_last_resno = 1;
|
||||
pstate->p_rtable = NIL;
|
||||
pstate->p_numAgg = 0;
|
||||
|
Reference in New Issue
Block a user