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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy