diff options
| author | Michael Meskes | 2015-06-15 12:20:09 +0000 |
|---|---|---|
| committer | Michael Meskes | 2015-06-15 12:22:18 +0000 |
| commit | 853222ce0012d56f26138709eecc7939f04a996d (patch) | |
| tree | 9441cc303251be7889744a3c77bbe072ff9c766b /src | |
| parent | 70767ac268de045b14fb7d6e570071f37ce13e74 (diff) | |
Fix memory leak in ecpglib's connect function.
Patch by Michael Paquier
Diffstat (limited to 'src')
| -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 55c56807b2f..e45d17fcc57 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) { |
