From: Peter Eisentraut Date: Thu, 8 Mar 2012 20:21:12 +0000 (+0200) Subject: ecpg: Fix rare memory leaks X-Git-Tag: REL9_0_8~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b108a77505f5a3b21c756d47ffa3c93b0d6166b7;p=thirdparty%2Fpostgresql.git ecpg: Fix rare memory leaks found by Coverity --- diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 1e11209890c..8ad671e70a0 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -1777,6 +1777,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char { setlocale(LC_NUMERIC, oldlocale); ecpg_free(oldlocale); + free_statement(stmt); va_end(args); return (false); } @@ -1808,6 +1809,7 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command); setlocale(LC_NUMERIC, oldlocale); ecpg_free(oldlocale); + free_statement(stmt); va_end(args); return (false); }