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
0251602f
Commit
0251602f
authored
Jun 06, 2006
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed two more memory leaks in ecpglib.
Synced parser.
parent
ff0ac57d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
140 additions
and
75 deletions
+140
-75
src/interfaces/ecpg/ecpglib/data.c
src/interfaces/ecpg/ecpglib/data.c
+8
-3
src/interfaces/ecpg/pgtypeslib/interval.c
src/interfaces/ecpg/pgtypeslib/interval.c
+2
-1
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+130
-71
No files found.
src/interfaces/ecpg/ecpglib/data.c
View file @
0251602f
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.3
0 2006/01/17 19:49:23
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.3
1 2006/06/06 11:31:55
meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
...
...
@@ -462,7 +462,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
nres
=
PGTYPESnumeric_from_asc
(
pval
,
&
scan_length
);
/* did we get an error? */
if
(
errno
!=
0
)
if
(
nres
==
NULL
)
{
ECPGlog
(
"ECPGget_data line %d: RESULT: %s errno %d
\n
"
,
lineno
,
pval
?
pval
:
""
,
errno
);
...
...
@@ -487,6 +487,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
if
(
garbage_left
(
isarray
,
scan_length
,
compat
))
{
free
(
nres
);
ECPGraise
(
lineno
,
ECPG_NUMERIC_FORMAT
,
ECPG_SQLSTATE_DATATYPE_MISMATCH
,
pval
);
return
(
false
);
}
...
...
@@ -500,6 +501,8 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
PGTYPESnumeric_copy
(
nres
,
(
numeric
*
)
(
var
+
offset
*
act_tuple
));
else
PGTYPESnumeric_to_decimal
(
nres
,
(
decimal
*
)
(
var
+
offset
*
act_tuple
));
free
(
nres
);
break
;
case
ECPGt_interval
:
...
...
@@ -511,7 +514,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
ires
=
PGTYPESinterval_from_asc
(
pval
,
&
scan_length
);
/* did we get an error? */
if
(
errno
!=
0
)
if
(
ires
==
NULL
)
{
if
(
INFORMIX_MODE
(
compat
))
{
...
...
@@ -534,6 +537,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
if
(
garbage_left
(
isarray
,
scan_length
,
compat
))
{
free
(
ires
);
ECPGraise
(
lineno
,
ECPG_INTERVAL_FORMAT
,
ECPG_SQLSTATE_DATATYPE_MISMATCH
,
pval
);
return
(
false
);
}
...
...
@@ -544,6 +548,7 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
ires
=
PGTYPESinterval_from_asc
(
"0 seconds"
,
NULL
);
PGTYPESinterval_copy
(
ires
,
(
interval
*
)
(
var
+
offset
*
act_tuple
));
free
(
ires
);
break
;
case
ECPGt_date
:
if
(
pval
)
...
...
src/interfaces/ecpg/pgtypeslib/interval.c
View file @
0251602f
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/interval.c,v 1.3
1 2006/03/11 04:38:39 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/interval.c,v 1.3
2 2006/06/06 11:31:55 meskes
Exp $ */
#include "postgres_fe.h"
#include <time.h>
...
...
@@ -793,6 +793,7 @@ PGTYPESinterval_from_asc(char *str, char **endptr)
return
NULL
;
}
errno
=
0
;
return
result
;
}
...
...
src/interfaces/ecpg/preproc/preproc.y
View file @
0251602f
This diff is collapsed.
Click to expand it.
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