1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-23 03:21:12 +03:00

Fix memory leak in ecpglib's connect function.

Patch by Michael Paquier
This commit is contained in:
Michael Meskes
2015-06-15 14:20:09 +02:00
parent 70767ac268
commit 853222ce00

View File

@ -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)
{