projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bed1cd
)
Fix memory leak in ecpglib's connect function.
author
Michael Meskes
Mon, 15 Jun 2015 12:20:09 +0000
(14:20 +0200)
committer
Michael Meskes
Mon, 15 Jun 2015 12:20:09 +0000
(14:20 +0200)
Patch by Michael Paquier
src/interfaces/ecpg/ecpglib/connect.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/ecpglib/connect.c
b/src/interfaces/ecpg/ecpglib/connect.c
index 55c56807b2f6b628a4f976a284038a25d95ea59e..e45d17fcc576ae500b8df197f29d523a2b542b97 100644
(file)
--- a/
src/interfaces/ecpg/ecpglib/connect.c
+++ b/
src/interfaces/ecpg/ecpglib/connect.c
@@
-321,7
+321,10
@@
ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
}
if ((this = (struct connection *) ecpg_alloc(sizeof(struct connection), lineno)) == NULL)
+ {
+ ecpg_free(dbname);
return false;
+ }
if (dbname != NULL)
{