mirror of
https://github.com/postgres/postgres.git
synced 2025-05-15 19:15:29 +03:00
Fix memory leak in ecpglib's connect function.
Patch by Michael Paquier
This commit is contained in:
parent
31c06d4b66
commit
3e2a17eecc
@ -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…
x
Reference in New Issue
Block a user