Content-Length: 260185 | pFad | http://github.com/postgrespro/postgres/commit/af0b49fc98cb3494d1e444a4f5c3364627a3ed5f

95 Fix memory leak in ecpglib's connect function. · postgrespro/postgres@af0b49f · GitHub
Skip to content

Commit af0b49f

Browse files
author
Michael Meskes
committed
Fix memory leak in ecpglib's connect function.
Patch by Michael Paquier
1 parent 2bed1cd commit af0b49f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/interfaces/ecpg/ecpglib/connect.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,10 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
321321
}
322322

323323
if ((this = (struct connection *) ecpg_alloc(sizeof(struct connection), lineno)) == NULL)
324+
{
325+
ecpg_free(dbname);
324326
return false;
327+
}
325328

326329
if (dbname != NULL)
327330
{

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/af0b49fc98cb3494d1e444a4f5c3364627a3ed5f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy