mirror of
https://github.com/postgres/postgres.git
synced 2026-02-18 01:59:53 -05:00
Fix memory leak in ecpglib's connect function.
Patch by Michael Paquier
This commit is contained in:
parent
ec311b1d8f
commit
fd1ff4a130
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue