1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +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 a5238ced67
commit a38f08bb9d

View File

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