diff options
author | Michael Meskes | 2015-06-15 12:20:09 +0000 |
---|---|---|
committer | Michael Meskes | 2015-06-15 12:20:09 +0000 |
commit | af0b49fc98cb3494d1e444a4f5c3364627a3ed5f (patch) | |
tree | 9356f5cf0c7acb50a595a2367fee942307283b7c | |
parent | 2bed1cd7519fb9f017a8e2ce9881086f14a31d7c (diff) |
Fix memory leak in ecpglib's connect function.
Patch by Michael Paquier
-rw-r--r-- | src/interfaces/ecpg/ecpglib/connect.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c index 55c56807b2..e45d17fcc5 100644 --- 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) { |