Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8dd4d10

Browse files
committed
ecpg: Fix rare memory leaks
found by Coverity
1 parentd93f209 commit8dd4d10

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

‎src/interfaces/ecpg/ecpglib/connect.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,10 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
519519
ecpg_free(realname);
520520
if (dbname)
521521
ecpg_free(dbname);
522+
if (conn_keywords)
523+
ecpg_free(conn_keywords);
524+
if (conn_values)
525+
ecpg_free(conn_values);
522526
free(this);
523527
return false;
524528
}

‎src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,6 +1776,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
17761776
{
17771777
setlocale(LC_NUMERIC,oldlocale);
17781778
ecpg_free(oldlocale);
1779+
free_statement(stmt);
17791780
va_end(args);
17801781
return (false);
17811782
}
@@ -1807,6 +1808,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
18071808
ecpg_raise(lineno,ECPG_INVALID_STMT,ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME,stmt->command);
18081809
setlocale(LC_NUMERIC,oldlocale);
18091810
ecpg_free(oldlocale);
1811+
free_statement(stmt);
18101812
va_end(args);
18111813
return (false);
18121814
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp