projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
235bd4c
)
Fix memory leak in ecpglib's connect function.
author
Michael Meskes
<
[email protected]
>
Mon, 15 Jun 2015 12:20:09 +0000
(14:20 +0200)
committer
Michael Meskes
<
[email protected]
>
Mon, 15 Jun 2015 12:23:30 +0000
(14:23 +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 b28ae8239be18809d2d4cd4efcde7e7903fe70bc..f008bbd4fe4225568c9a3a9f59bd8b8f1f31548b 100644
(file)
--- a/
src/interfaces/ecpg/ecpglib/connect.c
+++ b/
src/interfaces/ecpg/ecpglib/connect.c
@@
-322,7
+322,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)
{