Fix memory leak in ecpglib's connect function.

Patch by Michael Paquier
REL9_1_STABLE
Michael Meskes 11 years ago
parent a5238ced67
commit a38f08bb9d
  1. 3
      src/interfaces/ecpg/ecpglib/connect.c

@ -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) if ((this = (struct connection *) ecpg_alloc(sizeof(struct connection), lineno)) == NULL)
{
ecpg_free(dbname);
return false; return false;
}
if (dbname != NULL) if (dbname != NULL)
{ {

Loading…
Cancel
Save