projects
/
users
/
heikki
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5238ce
)
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:17 +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 4f5541308e53797b1e0da74810990f0434f3ab2c..d255c5d8f885caddab514b6b8d83cf198569759d 100644
(file)
--- a/
src/interfaces/ecpg/ecpglib/connect.c
+++ b/
src/interfaces/ecpg/ecpglib/connect.c
@@
-320,7
+320,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)
{