Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
d9623859
Commit
d9623859
authored
15 years ago
by
Michael Meskes
Browse files
Options
Downloads
Patches
Plain Diff
Made ECPG more robust against applications freeing strings, based on
patch send in by Boszormenyi Zoltan <zb@cybertec.at>.
parent
314288fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/interfaces/ecpg/ChangeLog
+5
-0
5 additions, 0 deletions
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ecpglib/prepare.c
+4
-2
4 additions, 2 deletions
src/interfaces/ecpg/ecpglib/prepare.c
with
9 additions
and
2 deletions
src/interfaces/ecpg/ChangeLog
+
5
−
0
View file @
d9623859
...
...
@@ -2438,6 +2438,11 @@ Thu, 01 Oct 2009 19:31:57 +0200
- Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix memory
leak in decimal handling.
Thu, 15 Oct 2009 12:15:31 +0200
- Made ECPG more robust against applications freeing strings, based on
patch send in by Boszormenyi Zoltan <zb@cybertec.at>.
- Set ecpg library version to 6.2.
- Set compat library version to 3.2.
- Set ecpg version to 4.6.
This diff is collapsed.
Click to expand it.
src/interfaces/ecpg/ecpglib/prepare.c
+
4
−
2
View file @
d9623859
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.3
2
2009/
07/22 11:07:02 mha
Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/prepare.c,v 1.3
3
2009/
10/15 10:20:15 meskes
Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include
"postgres_fe.h"
...
...
@@ -152,7 +152,7 @@ ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, c
replace_variables
(
&
(
stmt
->
command
),
lineno
);
/* add prepared statement to our list */
this
->
name
=
(
char
*
)
name
;
this
->
name
=
ecpg_strdup
(
name
,
lineno
)
;
this
->
stmt
=
stmt
;
/* and finally really prepare the statement */
...
...
@@ -160,6 +160,7 @@ ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, c
if
(
!
ecpg_check_PQresult
(
query
,
stmt
->
lineno
,
stmt
->
connection
->
connection
,
stmt
->
compat
))
{
ecpg_free
(
stmt
->
command
);
ecpg_free
(
this
->
name
);
ecpg_free
(
this
);
ecpg_free
(
stmt
);
return
false
;
...
...
@@ -238,6 +239,7 @@ deallocate_one(int lineno, enum COMPAT_MODE c, struct connection * con, struct p
/* okay, free all the resources */
ecpg_free
(
this
->
stmt
->
command
);
ecpg_free
(
this
->
stmt
);
ecpg_free
(
this
->
name
);
if
(
prev
!=
NULL
)
prev
->
next
=
this
->
next
;
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment