Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+3
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)