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
76475a7e
Commit
76475a7e
authored
Jul 28, 2006
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Variables should be free'ed only once.
parent
a27cb177
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+2
-1
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/execute.c
+4
-14
No files found.
src/interfaces/ecpg/ChangeLog
View file @
76475a7e
...
...
@@ -2043,7 +2043,7 @@ Mo Jun 26 16:08:23 CEST 2006
We Jul 5 12:17:28 CEST 2006
- Fixed remaining Coverity bugs.
- Fixed
most of the
remaining Coverity bugs.
Fr Jul 28 11:00:51 CEST 2006
...
...
@@ -2051,5 +2051,6 @@ Fr Jul 28 11:00:51 CEST 2006
- SHOW statement puts result into a variable
- COPY TO STDOUT works
- Connection identifier has to be unique
- Variables should be free'ed only once.
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
src/interfaces/ecpg/ecpglib/execute.c
View file @
76475a7e
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.5
4 2006/07/28 10:12:5
6 meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.5
5 2006/07/28 11:49:3
6 meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
...
...
@@ -1049,19 +1049,14 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
case
ECPGt_timestamp
:
{
char
*
str
=
NULL
,
*
asc
=
NULL
;
char
*
str
=
NULL
;
int
slen
;
if
(
var
->
arrsize
>
1
)
{
for
(
element
=
0
;
element
<
var
->
arrsize
;
element
++
)
{
asc
=
PGTYPEStimestamp_to_asc
(
*
(
timestamp
*
)
((
var
+
var
->
offset
*
element
)
->
value
));
if
(
!
asc
)
return
false
;
str
=
quote_postgres
(
asc
,
lineno
);
ECPGfree
(
asc
);
/* we don't need this anymore so free it asap. */
str
=
quote_postgres
(
PGTYPEStimestamp_to_asc
(
*
(
timestamp
*
)
((
var
+
var
->
offset
*
element
)
->
value
)),
lineno
);
if
(
!
str
)
return
false
;
...
...
@@ -1084,12 +1079,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
}
else
{
asc
=
PGTYPEStimestamp_to_asc
(
*
(
timestamp
*
)
(
var
->
value
));
if
(
!
asc
)
return
false
;
str
=
quote_postgres
(
asc
,
lineno
);
ECPGfree
(
asc
);
/* we don't need this anymore so free it asap. */
str
=
quote_postgres
(
PGTYPEStimestamp_to_asc
(
*
(
timestamp
*
)
(
var
->
value
)),
lineno
);
if
(
!
str
)
return
false
;
slen
=
strlen
(
str
);
...
...
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