Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a544b605
Commit
a544b605
authored
Dec 29, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change some mallocs to palloc.
parent
a1dd4090
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
15 deletions
+12
-15
src/backend/commands/explain.c
src/backend/commands/explain.c
+3
-3
src/backend/executor/nodeAgg.c
src/backend/executor/nodeAgg.c
+2
-2
src/backend/parser/analyze.c
src/backend/parser/analyze.c
+2
-3
src/backend/parser/parse_node.c
src/backend/parser/parse_node.c
+2
-2
src/backend/utils/adt/acl.c
src/backend/utils/adt/acl.c
+3
-5
No files found.
src/backend/commands/explain.c
View file @
a544b605
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.1
5 1997/11/25 21:58:53
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.1
6 1997/12/29 05:13:22
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -68,7 +68,7 @@ ExplainQuery(Query *query, bool verbose, CommandDest dest)
if
(
plan
==
NULL
)
return
;
es
=
(
ExplainState
*
)
m
alloc
(
sizeof
(
ExplainState
));
es
=
(
ExplainState
*
)
p
alloc
(
sizeof
(
ExplainState
));
MemSet
(
es
,
0
,
sizeof
(
ExplainState
));
es
->
printCost
=
true
;
/* default */
...
...
@@ -103,7 +103,7 @@ ExplainQuery(Query *query, bool verbose, CommandDest dest)
elog
(
NOTICE
,
"%.*s"
,
ELOG_MAXLEN
-
64
,
s
);
len
-=
ELOG_MAXLEN
-
64
;
}
free
(
es
);
p
free
(
es
);
}
/*****************************************************************************
...
...
src/backend/executor/nodeAgg.c
View file @
a544b605
...
...
@@ -266,11 +266,11 @@ ExecAgg(Agg *node)
tupValue
=
projInfo
->
pi_tupValue
;
/* initially, set all the values to NULL */
null_array
=
m
alloc
(
tupType
->
natts
);
null_array
=
p
alloc
(
tupType
->
natts
);
for
(
i
=
0
;
i
<
tupType
->
natts
;
i
++
)
null_array
[
i
]
=
'n'
;
oneTuple
=
heap_formtuple
(
tupType
,
tupValue
,
null_array
);
free
(
null_array
);
p
free
(
null_array
);
}
break
;
}
...
...
src/backend/parser/analyze.c
View file @
a544b605
...
...
@@ -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
);
p
free
(
pstate
);
}
return
result
;
...
...
src/backend/parser/parse_node.c
View file @
a544b605
...
...
@@ -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
=
m
alloc
(
sizeof
(
ParseState
));
pstate
=
p
alloc
(
sizeof
(
ParseState
));
pstate
->
p_last_resno
=
1
;
pstate
->
p_rtable
=
NIL
;
pstate
->
p_numAgg
=
0
;
...
...
src/backend/utils/adt/acl.c
View file @
a544b605
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.2
0 1997/11/24 05:08:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.2
1 1997/12/29 05:13:57
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -580,7 +580,6 @@ aclcontains(Acl *acl, AclItem *aip)
*
* does not add duplicate privileges
*
* the CALLER is reponsible for free'ing the string returned
*/
char
*
...
...
@@ -591,7 +590,7 @@ aclmakepriv(char *old_privlist, char new_priv)
int
l
;
Assert
(
strlen
(
old_privlist
)
<
5
);
priv
=
m
alloc
(
5
);
/* at most "rwaR" */
;
priv
=
p
alloc
(
5
);
/* at most "rwaR" */
;
if
(
old_privlist
==
NULL
||
old_privlist
[
0
]
==
'\0'
)
{
...
...
@@ -634,7 +633,6 @@ aclmakepriv(char *old_privlist, char new_priv)
*
* this routine is used in the parser
*
* the CALLER is responsible for freeing the memory allocated
*/
char
*
...
...
@@ -642,7 +640,7 @@ aclmakeuser(char *user_type, char *user)
{
char
*
user_list
;
user_list
=
m
alloc
(
strlen
(
user
)
+
3
);
user_list
=
p
alloc
(
strlen
(
user
)
+
3
);
sprintf
(
user_list
,
"%s %s"
,
user_type
,
user
);
return
user_list
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment