Skip to content

Commit b108a77

Browse files
committed
ecpg: Fix rare memory leaks
found by Coverity
1 parent ebe6089 commit b108a77

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/interfaces/ecpg/ecpglib/execute.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,6 +1777,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
17771777
{
17781778
setlocale(LC_NUMERIC, oldlocale);
17791779
ecpg_free(oldlocale);
1780+
free_statement(stmt);
17801781
va_end(args);
17811782
return (false);
17821783
}
@@ -1808,6 +1809,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
18081809
ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command);
18091810
setlocale(LC_NUMERIC, oldlocale);
18101811
ecpg_free(oldlocale);
1812+
free_statement(stmt);
18111813
va_end(args);
18121814
return (false);
18131815
}

0 commit comments

Comments
 (0)