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
524d65d4
Commit
524d65d4
authored
Apr 24, 2006
by
Michael Meskes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory leak bugs found by Martijn Oosterhout.
parent
a16ffee7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
17 deletions
+16
-17
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+4
-0
src/interfaces/ecpg/compatlib/informix.c
src/interfaces/ecpg/compatlib/informix.c
+5
-5
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/execute.c
+2
-2
src/interfaces/ecpg/pgtypeslib/numeric.c
src/interfaces/ecpg/pgtypeslib/numeric.c
+5
-10
No files found.
src/interfaces/ecpg/ChangeLog
View file @
524d65d4
...
...
@@ -1997,6 +1997,10 @@ Tu Feb 7 18:48:14 CET 2006
Fri, 17 Mar 2006 16:38:19 +0100
- Fixed bug 2330: Wrong error code in case of a duplicate key
Mo Apr 24 11:40:05 CEST 2006
- Fixed memory leak bugs found by Martijn Oosterhout.
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
src/interfaces/ecpg/compatlib/informix.c
View file @
524d65d4
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.4
1 2006/03/11 04:38:39 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.4
2 2006/04/24 09:45:22 meskes
Exp $ */
#include <stdlib.h>
#include <string.h>
...
...
@@ -166,15 +166,15 @@ ecpg_strndup(const char *str, size_t len)
int
deccvasc
(
char
*
cp
,
int
len
,
decimal
*
np
)
{
char
*
str
=
ecpg_strndup
(
cp
,
len
);
/* decimal_in always converts
* the complete string */
int
ret
=
0
;
numeric
*
result
;
char
*
str
;
int
ret
=
0
;
numeric
*
result
;
rsetnull
(
CDECIMALTYPE
,
(
char
*
)
np
);
if
(
risnull
(
CSTRINGTYPE
,
cp
))
return
0
;
str
=
ecpg_strndup
(
cp
,
len
);
/* decimal_in always converts the complete string */
if
(
!
str
)
ret
=
ECPG_INFORMIX_NUM_UNDERFLOW
;
else
...
...
src/interfaces/ecpg/ecpglib/execute.c
View file @
524d65d4
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.4
4 2005/11/30 12:49:49
meskes Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/execute.c,v 1.4
5 2006/04/24 09:45:22
meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
...
...
@@ -860,7 +860,7 @@ ECPGstore_input(const int lineno, const bool force_indicator, const struct varia
if
(
var
->
arrsize
>
1
)
{
for
(
element
=
0
;
element
<
var
->
arrsize
;
element
++
)
for
(
element
=
0
;
element
<
var
->
arrsize
;
element
++
,
nval
=
PGTYPESnumeric_new
()
)
{
if
(
var
->
type
==
ECPGt_numeric
)
PGTYPESnumeric_copy
((
numeric
*
)
((
var
+
var
->
offset
*
element
)
->
value
),
nval
);
...
...
src/interfaces/ecpg/pgtypeslib/numeric.c
View file @
524d65d4
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/numeric.c,v 1.2
5 2006/03/11 04:38:40 momjian
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/numeric.c,v 1.2
6 2006/04/24 09:45:22 meskes
Exp $ */
#include "postgres_fe.h"
#include <ctype.h>
...
...
@@ -364,24 +364,19 @@ PGTYPESnumeric_from_asc(char *str, char **endptr)
numeric
*
value
=
(
numeric
*
)
pgtypes_alloc
(
sizeof
(
numeric
));
int
ret
;
#if 0
long typmod = -1;
#endif
char
*
realptr
;
char
**
ptr
=
(
endptr
!=
NULL
)
?
endptr
:
&
realptr
;
if
(
!
value
)
if
(
!
value
)
return
(
NULL
);
ret
=
set_var_from_str
(
str
,
ptr
,
value
);
if
(
ret
)
{
free
(
value
);
return
(
NULL
);
}
#if 0
ret = apply_typmod(value, typmod);
if (ret)
return (NULL);
#endif
return
(
value
);
}
...
...
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